summaryrefslogtreecommitdiffstats
path: root/crypto/engine
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-03-11 18:02:52 +0100
committerTomas Mraz <tomas@openssl.org>2021-03-12 15:11:21 +0100
commit12b4e5821d59b5d0c35f830e078d842583be6486 (patch)
treeeeb47b387a932c61534473309439f075e641e443 /crypto/engine
parent343475126e55b4e814acb495196b92680df70a88 (diff)
Use OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL) in libcrypto
Calling OPENSSL_init_crypto(0, NULL) is a no-op and will not properly initialize thread local handling. Only the calls that are needed to initialize thread locals are kept, the rest of the no-op calls are removed. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14497)
Diffstat (limited to 'crypto/engine')
-rw-r--r--crypto/engine/eng_lib.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c
index 72e463a899..4a01104462 100644
--- a/crypto/engine/eng_lib.c
+++ b/crypto/engine/eng_lib.c
@@ -20,8 +20,6 @@ CRYPTO_ONCE engine_lock_init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE(do_engine_lock_init)
{
- if (!OPENSSL_init_crypto(0, NULL))
- return 0;
global_engine_lock = CRYPTO_THREAD_lock_new();
return global_engine_lock != NULL;
}