]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
call init_ssl(), not init_crypto()
authorAlan T. DeKok <aland@freeradius.org>
Mon, 25 Jul 2022 11:19:15 +0000 (07:19 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 25 Jul 2022 11:21:32 +0000 (07:21 -0400)
init_ssl() calls init_crypto(), too.  And we need both in order
to pre-load all error strings.  Helps with comments in #4624

src/lib/tls/base.c

index 30e6bc02b464b9c6ffd2144bcbd9d5e21b0dec3a..074b251c42768fab71689d9b16d89f473da6e223 100644 (file)
@@ -397,7 +397,10 @@ int fr_openssl_init(void)
         *      they may unload elements of providers once all
         *      the contexts have been cleaned up.
         */
-       OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT | OPENSSL_INIT_LOAD_CONFIG, NULL);
+       if (OPENSSL_init_ssl(OPENSSL_INIT_NO_ATEXIT | OPENSSL_INIT_LOAD_CONFIG, NULL) != 1) {
+               fr_tls_log_error(NULL, "Failed calling OPENSSL_init_crypto()");
+               return -1;
+       }
 
 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
        /*