|
|
a5ef24 |
diff -up openssl-1.0.1c/apps/s_client.c.default-paths openssl-1.0.1c/apps/s_client.c
|
|
|
a5ef24 |
--- openssl-1.0.1c/apps/s_client.c.default-paths 2012-03-18 19:16:05.000000000 +0100
|
|
|
a5ef24 |
+++ openssl-1.0.1c/apps/s_client.c 2012-12-06 18:24:06.425933203 +0100
|
|
|
a5ef24 |
@@ -1166,12 +1166,19 @@ bad:
|
|
|
a5ef24 |
if (!set_cert_key_stuff(ctx,cert,key))
|
|
|
a5ef24 |
goto end;
|
|
|
a5ef24 |
|
|
|
a5ef24 |
- if ((!SSL_CTX_load_verify_locations(ctx,CAfile,CApath)) ||
|
|
|
a5ef24 |
- (!SSL_CTX_set_default_verify_paths(ctx)))
|
|
|
a5ef24 |
+ if (CAfile == NULL && CApath == NULL)
|
|
|
a5ef24 |
{
|
|
|
a5ef24 |
- /* BIO_printf(bio_err,"error setting default verify locations\n"); */
|
|
|
a5ef24 |
- ERR_print_errors(bio_err);
|
|
|
a5ef24 |
- /* goto end; */
|
|
|
a5ef24 |
+ if (!SSL_CTX_set_default_verify_paths(ctx))
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ ERR_print_errors(bio_err);
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
+ else
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ if (!SSL_CTX_load_verify_locations(ctx,CAfile,CApath))
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ ERR_print_errors(bio_err);
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
}
|
|
|
a5ef24 |
|
|
|
a5ef24 |
#ifndef OPENSSL_NO_TLSEXT
|
|
|
a5ef24 |
diff -up openssl-1.0.1c/apps/s_server.c.default-paths openssl-1.0.1c/apps/s_server.c
|
|
|
a5ef24 |
--- openssl-1.0.1c/apps/s_server.c.default-paths 2012-03-18 19:16:05.000000000 +0100
|
|
|
a5ef24 |
+++ openssl-1.0.1c/apps/s_server.c 2012-12-06 18:25:11.199329611 +0100
|
|
|
a5ef24 |
@@ -1565,13 +1565,21 @@ bad:
|
|
|
a5ef24 |
}
|
|
|
a5ef24 |
#endif
|
|
|
a5ef24 |
|
|
|
a5ef24 |
- if ((!SSL_CTX_load_verify_locations(ctx,CAfile,CApath)) ||
|
|
|
a5ef24 |
- (!SSL_CTX_set_default_verify_paths(ctx)))
|
|
|
a5ef24 |
+ if (CAfile == NULL && CApath == NULL)
|
|
|
a5ef24 |
{
|
|
|
a5ef24 |
- /* BIO_printf(bio_err,"X509_load_verify_locations\n"); */
|
|
|
a5ef24 |
- ERR_print_errors(bio_err);
|
|
|
a5ef24 |
- /* goto end; */
|
|
|
a5ef24 |
+ if (!SSL_CTX_set_default_verify_paths(ctx))
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ ERR_print_errors(bio_err);
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
+ else
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ if (!SSL_CTX_load_verify_locations(ctx,CAfile,CApath))
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ ERR_print_errors(bio_err);
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
}
|
|
|
a5ef24 |
+
|
|
|
a5ef24 |
if (vpm)
|
|
|
a5ef24 |
SSL_CTX_set1_param(ctx, vpm);
|
|
|
a5ef24 |
|
|
|
a5ef24 |
@@ -1622,8 +1630,11 @@ bad:
|
|
|
a5ef24 |
else
|
|
|
a5ef24 |
SSL_CTX_sess_set_cache_size(ctx2,128);
|
|
|
a5ef24 |
|
|
|
a5ef24 |
- if ((!SSL_CTX_load_verify_locations(ctx2,CAfile,CApath)) ||
|
|
|
a5ef24 |
- (!SSL_CTX_set_default_verify_paths(ctx2)))
|
|
|
a5ef24 |
+ if (!SSL_CTX_load_verify_locations(ctx2,CAfile,CApath))
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ ERR_print_errors(bio_err);
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
+ if (!SSL_CTX_set_default_verify_paths(ctx2))
|
|
|
a5ef24 |
{
|
|
|
a5ef24 |
ERR_print_errors(bio_err);
|
|
|
a5ef24 |
}
|
|
|
a5ef24 |
diff -up openssl-1.0.1c/apps/s_time.c.default-paths openssl-1.0.1c/apps/s_time.c
|
|
|
a5ef24 |
--- openssl-1.0.1c/apps/s_time.c.default-paths 2006-04-17 14:22:13.000000000 +0200
|
|
|
a5ef24 |
+++ openssl-1.0.1c/apps/s_time.c 2012-12-06 18:27:41.694574044 +0100
|
|
|
a5ef24 |
@@ -373,12 +373,19 @@ int MAIN(int argc, char **argv)
|
|
|
a5ef24 |
|
|
|
a5ef24 |
SSL_load_error_strings();
|
|
|
a5ef24 |
|
|
|
a5ef24 |
- if ((!SSL_CTX_load_verify_locations(tm_ctx,CAfile,CApath)) ||
|
|
|
a5ef24 |
- (!SSL_CTX_set_default_verify_paths(tm_ctx)))
|
|
|
a5ef24 |
+ if (CAfile == NULL && CApath == NULL)
|
|
|
a5ef24 |
{
|
|
|
a5ef24 |
- /* BIO_printf(bio_err,"error setting default verify locations\n"); */
|
|
|
a5ef24 |
- ERR_print_errors(bio_err);
|
|
|
a5ef24 |
- /* goto end; */
|
|
|
a5ef24 |
+ if (!SSL_CTX_set_default_verify_paths(tm_ctx))
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ ERR_print_errors(bio_err);
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
+ else
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ if (!SSL_CTX_load_verify_locations(tm_ctx,CAfile,CApath))
|
|
|
a5ef24 |
+ {
|
|
|
a5ef24 |
+ ERR_print_errors(bio_err);
|
|
|
a5ef24 |
+ }
|
|
|
a5ef24 |
}
|
|
|
a5ef24 |
|
|
|
a5ef24 |
if (tm_cipher == NULL)
|