]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - apps/x509.c
APPS: replace awkward and error-prone pattern by calls to new app_conf_try_string()
[thirdparty/openssl.git] / apps / x509.c
index 7a935e1f70b88c41256db268db9d1ad18e388eca..35f788c6dd2d3e52d822ce2e8e13668a14bcaebb 100644 (file)
@@ -687,11 +687,9 @@ int x509_main(int argc, char **argv)
         if ((extconf = app_load_config(extfile)) == NULL)
             goto end;
         if (extsect == NULL) {
-            extsect = NCONF_get_string(extconf, "default", "extensions");
-            if (extsect == NULL) {
-                ERR_clear_error();
+            extsect = app_conf_try_string(extconf, "default", "extensions");
+            if (extsect == NULL)
                 extsect = "default";
-            }
         }
         X509V3_set_ctx_test(&ctx2);
         X509V3_set_nconf(&ctx2, extconf);