summaryrefslogtreecommitdiffstats
path: root/crypto/provider.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-06-21 12:34:04 +0200
committerMatt Caswell <matt@openssl.org>2021-06-24 15:48:14 +0200
commiteb2263da9abf3676cbcac672eee8a26416a8c309 (patch)
treedeaa7046d31cd09982f119e39ff4a20dbd047891 /crypto/provider.c
parentRemove flag_couldbechild (diff)
downloadopenssl-eb2263da9abf3676cbcac672eee8a26416a8c309.tar.xz
openssl-eb2263da9abf3676cbcac672eee8a26416a8c309.zip
Set use_fallbacks to zero when we add a provider to the store
Update use_fallbacks to zero when we add a provider to the store rather than when we activate it. Its only at the point that we add it to the store that it is actually usable and visible to other threads. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15854)
Diffstat (limited to 'crypto/provider.c')
-rw-r--r--crypto/provider.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/provider.c b/crypto/provider.c
index 12336acc57..f5dbc4f94a 100644
--- a/crypto/provider.c
+++ b/crypto/provider.c
@@ -26,12 +26,12 @@ OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *libctx, const char *name,
isnew = 1;
}
- if (!ossl_provider_activate(prov, retain_fallbacks, 1)) {
+ if (!ossl_provider_activate(prov, 1)) {
ossl_provider_free(prov);
return NULL;
}
- if (isnew && !ossl_provider_add_to_store(prov)) {
+ if (isnew && !ossl_provider_add_to_store(prov, retain_fallbacks)) {
ossl_provider_deactivate(prov);
ossl_provider_free(prov);
return NULL;