Upstream-Issue: https://github.com/meganz/sdk/issues/2622 --- a/src/posix/net.cpp +++ b/src/posix/net.cpp @@ -279,9 +279,9 @@ // OPENSSL_VERSION_NUMBER could be used to skip this initialization, but // since there are so many implementations of OpenSSL, I think that it's // safer to provide the mutexes even if they are not really needed. - if (!CRYPTO_get_locking_callback() && !sslMutexes + if (CRYPTO_get_locking_callback() != NULL && !sslMutexes #if OPENSSL_VERSION_NUMBER >= 0x10000000 || defined (LIBRESSL_VERSION_NUMBER) - && !CRYPTO_THREADID_get_callback()) + && CRYPTO_THREADID_get_callback() != NULL) #else && !CRYPTO_get_id_callback()) #endif