From: Dr. Stephen Henson Date: Wed, 17 Nov 2004 18:36:43 +0000 (+0000) Subject: In "req" exit immediately if configuration file is needed and it can't X-Git-Tag: BEN_FIPS_TEST_6~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2b354390b8665a45f3c4412227f6e8adae4f7938;p=oweals%2Fopenssl.git In "req" exit immediately if configuration file is needed and it can't be loaded instead of giving the misleading: "unable to find 'distinguised_name' in config" error message. --- diff --git a/apps/req.c b/apps/req.c index 046bb3dc90..d33cddc94d 100644 --- a/apps/req.c +++ b/apps/req.c @@ -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)