summaryrefslogtreecommitdiff
path: root/apps/openssl.c
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2008-09-21 14:56:30 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2008-09-21 14:56:30 +0000
commitbb1499d2aac1d25a95b8573ff425751f06f159e1 (patch)
treea136b5b2317abe8eb83b021afe5e088230fd67e2 /apps/openssl.c
parentee266f1253f9cc49430572463d26f72910dfb49e (diff)
Diffstat (limited to 'apps/openssl.c')
-rw-r--r--apps/openssl.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/openssl.c b/apps/openssl.c
index 47aee5b712622..ec25f990febb4 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -273,9 +273,21 @@ int main(int Argc, char *Argv[])
i=NCONF_load(config,p,&errline);
if (i == 0)
{
- NCONF_free(config);
- config = NULL;
- ERR_clear_error();
+ if (ERR_GET_REASON(ERR_peek_last_error())
+ == CONF_R_NO_SUCH_FILE)
+ {
+ BIO_printf(bio_err,
+ "WARNING: can't open config file: %s\n",p);
+ ERR_clear_error();
+ NCONF_free(config);
+ config = NULL;
+ }
+ else
+ {
+ ERR_print_errors(bio_err);
+ NCONF_free(config);
+ exit(1);
+ }
}
prog=prog_init();