Fix CRYPTO_THREAD_run_once return value checks
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
committed by
Richard Levitte
parent
e58d91027a
commit
3ddd1d0458
@@ -594,13 +594,13 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
|
|||||||
# ifndef OPENSSL_NO_STATIC_ENGINE
|
# ifndef OPENSSL_NO_STATIC_ENGINE
|
||||||
# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
|
# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
|
||||||
if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
|
if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
|
||||||
&& CRYPTO_THREAD_run_once(&engine_padlock,
|
&& !CRYPTO_THREAD_run_once(&engine_padlock,
|
||||||
ossl_init_engine_padlock))
|
ossl_init_engine_padlock))
|
||||||
return 0;
|
return 0;
|
||||||
# endif
|
# endif
|
||||||
# if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
|
# if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
|
||||||
if ((opts & OPENSSL_INIT_ENGINE_CAPI)
|
if ((opts & OPENSSL_INIT_ENGINE_CAPI)
|
||||||
&& CRYPTO_THREAD_run_once(&engine_capi, ossl_init_engine_capi))
|
&& !CRYPTO_THREAD_run_once(&engine_capi, ossl_init_engine_capi))
|
||||||
return 0;
|
return 0;
|
||||||
# endif
|
# endif
|
||||||
if ((opts & OPENSSL_INIT_ENGINE_DASYNC)
|
if ((opts & OPENSSL_INIT_ENGINE_DASYNC)
|
||||||
@@ -621,7 +621,7 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
|
|||||||
|
|
||||||
#ifndef OPENSSL_NO_COMP
|
#ifndef OPENSSL_NO_COMP
|
||||||
if ((opts & OPENSSL_INIT_ZLIB)
|
if ((opts & OPENSSL_INIT_ZLIB)
|
||||||
&& CRYPTO_THREAD_run_once(&zlib, ossl_init_zlib))
|
&& !CRYPTO_THREAD_run_once(&zlib, ossl_init_zlib))
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user