[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Mon May 9 14:56:36 UTC 2016


The branch master has been updated
       via  2e66d3d674d3a54593e0cbb4ff1f6039fd965d66 (commit)
      from  e8173157021518d3595fe8df62ea602940e6c8f4 (commit)


- Log -----------------------------------------------------------------
commit 2e66d3d674d3a54593e0cbb4ff1f6039fd965d66
Author: Hansruedi Patzen <hp at revy.ch>
Date:   Sat Feb 20 17:27:02 2016 +0100

    Fix: failed to open config file if not specified when using CA commands
    
    Issue was introduced in
    https://github.com/openssl/openssl/commit/a0a82324f965bbcc4faed4e1ee3fcaf81ea52166
    
    This patch fixes an issue which causes the 'openssl ca' commands to
    fail if '-config' is not specified even if it says so otherwise.
    Problem is that the default config is not loaded and the conf variable
    is NULL which causes an exception.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>

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

Summary of changes:
 apps/ca.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/apps/ca.c b/apps/ca.c
index 0e7bfdc..880e0b9 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -304,11 +304,6 @@ int ca_main(int argc, char **argv)
     X509_REVOKED *r = NULL;
     OPTION_CHOICE o;
 
-    conf = NULL;
-    section = NULL;
-    preserve = 0;
-    msie_hack = 0;
-
     prog = opt_init(argc, argv, ca_options);
     while ((o = opt_next()) != OPT_EOF) {
         switch (o) {
@@ -481,13 +476,11 @@ end_of_options:
     argv = opt_rest();
 
     BIO_printf(bio_err, "Using configuration from %s\n", configfile);
-    /* We already loaded the default config file */
-    if (configfile != default_config_file) {
-        if ((conf = app_load_config(configfile)) == NULL)
-            goto end;
-        if (!app_load_modules(conf))
-            goto end;
-    }
+
+    if ((conf = app_load_config(configfile)) == NULL)
+        goto end;
+    if (!app_load_modules(conf))
+        goto end;
 
     /* Lets get the config section we are using */
     if (section == NULL) {


More information about the openssl-commits mailing list