In apps_startup(), call OPENSSL_init_ssl() rather than OPENSSL_init_crypto()
authorRichard Levitte <levitte@openssl.org>
Sat, 25 Nov 2017 11:08:47 +0000 (12:08 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 8 Dec 2017 15:09:31 +0000 (16:09 +0100)
Otherwise, any command that relies on ssl modules may fail, because
SSL_add_ssl_module() will be called after the config file has already
been loaded.

Fixes #4788

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4792)

(cherry picked from commit 0488c0bbbe87eee3a800797b91350c653e9f1711)

apps/openssl.c

index b99bfa8d4800d4af362f705f97ea096cafd79359..6e7b02c64d45d1652831da6526cbadf4c9d7c1d8 100644 (file)
@@ -69,8 +69,8 @@ static int apps_startup()
 #endif
 
     /* Set non-default library initialisation settings */
-    if (!OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN
-                             | OPENSSL_INIT_LOAD_CONFIG, NULL))
+    if (!OPENSSL_init_ssl(OPENSSL_INIT_ENGINE_ALL_BUILTIN
+                          | OPENSSL_INIT_LOAD_CONFIG, NULL))
         return 0;
 
 #ifndef OPENSSL_NO_UI