[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Mar 25 13:11:14 UTC 2015


The branch master has been updated
       via  70e5fd877890489a3972bf8bf50bfec1fca3875e (commit)
      from  c62e94d805fa2900a0d6d723715aaf45f75b6c14 (commit)


- Log -----------------------------------------------------------------
commit 70e5fd877890489a3972bf8bf50bfec1fca3875e
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Feb 25 11:30:43 2015 +0000

    Fix bug in s_client. Previously default verify locations would only be loaded
    if CAfile or CApath were also supplied and successfully loaded first.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/s_client.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/apps/s_client.c b/apps/s_client.c
index c02ed3c..cdea322 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -1352,13 +1352,12 @@ int MAIN(int argc, char **argv)
 
     SSL_CTX_set_verify(ctx, verify, verify_callback);
 
-    if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) ||
-        (!SSL_CTX_set_default_verify_paths(ctx))) {
-        /*
-         * BIO_printf(bio_err,"error setting default verify locations\n");
-         */
+    if ((CAfile || CApath)
+        && !SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) {
+        ERR_print_errors(bio_err);
+    }
+    if (!SSL_CTX_set_default_verify_paths(ctx)) {
         ERR_print_errors(bio_err);
-        /* goto end; */
     }
 
     ssl_ctx_add_crls(ctx, crls, crl_download);


More information about the openssl-commits mailing list