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