Blame SOURCES/openssl-1.0.2c-default-paths.patch

e62613
diff -up openssl-1.0.2c/apps/s_server.c.default-paths openssl-1.0.2c/apps/s_server.c
e62613
--- openssl-1.0.2c/apps/s_server.c.default-paths	2015-06-12 16:51:21.000000000 +0200
e62613
+++ openssl-1.0.2c/apps/s_server.c	2015-06-15 17:24:17.747446515 +0200
e62613
@@ -1788,12 +1788,16 @@ int MAIN(int argc, char *argv[])
e62613
     }
e62613
 #endif
e62613
 
e62613
-    if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) ||
e62613
-        (!SSL_CTX_set_default_verify_paths(ctx))) {
e62613
-        /* BIO_printf(bio_err,"X509_load_verify_locations\n"); */
e62613
-        ERR_print_errors(bio_err);
e62613
-        /* goto end; */
e62613
+    if (CAfile == NULL && CApath == NULL) {
e62613
+        if (!SSL_CTX_set_default_verify_paths(ctx)) {
e62613
+            ERR_print_errors(bio_err);
e62613
+        }
e62613
+    } else {
e62613
+        if (!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) {
e62613
+            ERR_print_errors(bio_err);
e62613
+        }
e62613
     }
e62613
+
e62613
     if (vpm)
e62613
         SSL_CTX_set1_param(ctx, vpm);
e62613
 
e62613
@@ -1850,8 +1854,10 @@ int MAIN(int argc, char *argv[])
e62613
         else
e62613
             SSL_CTX_sess_set_cache_size(ctx2, 128);
e62613
 
e62613
-        if ((!SSL_CTX_load_verify_locations(ctx2, CAfile, CApath)) ||
e62613
-            (!SSL_CTX_set_default_verify_paths(ctx2))) {
e62613
+        if (!SSL_CTX_load_verify_locations(ctx2, CAfile, CApath)) {
e62613
+            ERR_print_errors(bio_err);
e62613
+        }
e62613
+        if (!SSL_CTX_set_default_verify_paths(ctx2)) {
e62613
             ERR_print_errors(bio_err);
e62613
         }
e62613
         if (vpm)
e62613
diff -up openssl-1.0.2c/apps/s_time.c.default-paths openssl-1.0.2c/apps/s_time.c
e62613
--- openssl-1.0.2c/apps/s_time.c.default-paths	2015-06-12 16:51:21.000000000 +0200
e62613
+++ openssl-1.0.2c/apps/s_time.c	2015-06-15 17:24:17.747446515 +0200
e62613
@@ -381,13 +381,14 @@ int MAIN(int argc, char **argv)
e62613
 
e62613
     SSL_load_error_strings();
e62613
 
e62613
-    if ((!SSL_CTX_load_verify_locations(tm_ctx, CAfile, CApath)) ||
e62613
-        (!SSL_CTX_set_default_verify_paths(tm_ctx))) {
e62613
-        /*
e62613
-         * BIO_printf(bio_err,"error setting default verify locations\n");
e62613
-         */
e62613
-        ERR_print_errors(bio_err);
e62613
-        /* goto end; */
e62613
+    if (CAfile == NULL && CApath == NULL) {
e62613
+        if (!SSL_CTX_set_default_verify_paths(tm_ctx)) {
e62613
+            ERR_print_errors(bio_err);
e62613
+        }
e62613
+    } else {
e62613
+        if (!SSL_CTX_load_verify_locations(tm_ctx, CAfile, CApath)) {
e62613
+            ERR_print_errors(bio_err);
e62613
+        }
e62613
     }
e62613
 
e62613
     if (tm_cipher == NULL)