aboutsummaryrefslogtreecommitdiff
path: root/crypto/rand
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/rand
parent343475126e55b4e814acb495196b92680df70a88 (diff)
downloadopenssl-12b4e5821d59b5d0c35f830e078d842583be6486.zip
openssl-12b4e5821d59b5d0c35f830e078d842583be6486.tar.gz
openssl-12b4e5821d59b5d0c35f830e078d842583be6486.tar.bz2
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/rand')
-rw-r--r--crypto/rand/rand_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 0ee57dc..e248d57 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -429,7 +429,7 @@ static void *rand_ossl_ctx_new(OSSL_LIB_CTX *libctx)
* We need to ensure that base libcrypto thread handling has been
* initialised.
*/
- OPENSSL_init_crypto(0, NULL);
+ OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
#endif
dgbl->lock = CRYPTO_THREAD_lock_new();