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:13 +0000 (18:36 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 17 Nov 2004 18:36:13 +0000 (18:36 +0000)
be loaded instead of giving the misleading:

"unable to find 'distinguised_name' in config"

error message.

apps/req.c

index 0f3d496d47814bd2553d81da8b57b69b3575526a..d634268653c4c37e969fdad92f7b14eba68bdd08 100644 (file)
@@ -567,13 +567,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)