diff options
author | Richard Levitte <levitte@openssl.org> | 2021-03-01 13:27:15 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-03-04 16:09:02 +0100 |
commit | d60a8e0a2345205242e21aae35815645708580c4 (patch) | |
tree | 6f6833f21ed0db98b08880092e7b24dbb242ced0 | |
parent | 2f17e978a0ec5becda8a61dcf3e7840740ccdfd3 (diff) |
Make ossl_provider_disable_fallback_loading() thread safe
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14354)
-rw-r--r-- | crypto/provider_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c index d210026e25..3696ba1478 100644 --- a/crypto/provider_core.c +++ b/crypto/provider_core.c @@ -201,7 +201,9 @@ int ossl_provider_disable_fallback_loading(OSSL_LIB_CTX *libctx) struct provider_store_st *store; if ((store = get_provider_store(libctx)) != NULL) { + CRYPTO_THREAD_write_lock(store->lock); store->use_fallbacks = 0; + CRYPTO_THREAD_unlock(store->lock); return 1; } return 0; |