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

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