When apps_startup() fails, exit with a failure code and a message
authorRichard Levitte <levitte@openssl.org>
Fri, 30 Jun 2017 18:47:45 +0000 (20:47 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 1 Jul 2017 08:04:07 +0000 (10:04 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3816)

(cherry picked from commit f2da4a4917eae1bf66290e1bd8ccd3db69d3fe63)

apps/openssl.c

index e69e7d9b4f56e37e2b1a771e674fc622bf2eb0d0..b99bfa8d4800d4af362f705f97ea096cafd79359 100644 (file)
@@ -154,8 +154,13 @@ int main(int argc, char *argv[])
 #endif
     }
 
-    if (!apps_startup())
+    if (!apps_startup()) {
+        BIO_printf(bio_err,
+                   "FATAL: Startup failure (dev note: apps_startup() failed)\n");
+        ERR_print_errors(bio_err);
+        ret = 1;
         goto end;
+    }
 
     prog = prog_init();
     pname = opt_progname(argv[0]);