Centralise loading default apps config file
[openssl.git] / apps / ca.c
index defbf007f6732ed1537feb92b2673fd6f190b427..586fbe4b5689a4b92f47f42a65931cc4bc5fd8f6 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -484,10 +484,13 @@ end_of_options:
     argv = opt_rest();
 
     BIO_printf(bio_err, "Using configuration from %s\n", configfile);
-    if ((conf = app_load_config(configfile)) == NULL)
-        goto end;
-    if (!app_load_modules(conf))
-        goto end;
+    /* 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;
+    }
 
     /* Lets get the config section we are using */
     if (section == NULL) {