In "req" exit immediately if configuration file is needed and it can't
authorDr. Stephen Henson <steve@openssl.org>
Wed, 17 Nov 2004 18:36:43 +0000 (18:36 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 17 Nov 2004 18:36:43 +0000 (18:36 +0000)
be loaded instead of giving the misleading:

"unable to find 'distinguised_name' in config"

error message.

apps/req.c

index 046bb3dc90ceb438272c9ad8a8da3475e7f3f518..d33cddc94dd68e899915b4bdd597e5aa2142ba89 100644 (file)
@@ -499,13 +499,16 @@ bad:
        else
                {
                req_conf=config;
-               if( verbose )
-                       BIO_printf(bio_err,"Using configuration from %s\n",
-                       default_config_file);
+
                if (req_conf == NULL)
                        {
-                       BIO_printf(bio_err,"Unable to load config info\n");
+                       BIO_printf(bio_err,"Unable to load config info from %s\n", default_config_file);
+                       if (newreq)
+                               goto end;
                        }
+               else if( verbose )
+                       BIO_printf(bio_err,"Using configuration from %s\n",
+                       default_config_file);
                }
 
        if (req_conf != NULL)