From 00dd8f6d6e703dadab3c50af84ed55ffff598ddc Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 17 Nov 2004 18:36:13 +0000 Subject: 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. --- apps/req.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'apps/req.c') diff --git a/apps/req.c b/apps/req.c index 0f3d496d47..d634268653 100644 --- a/apps/req.c +++ b/apps/req.c @@ -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) -- cgit v1.2.3