summaryrefslogtreecommitdiffstats
path: root/crypto/provider_child.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-06-21 11:34:04 +0100
committerMatt Caswell <matt@openssl.org>2021-06-24 14:48:14 +0100
commiteb2263da9abf3676cbcac672eee8a26416a8c309 (patch)
treedeaa7046d31cd09982f119e39ff4a20dbd047891 /crypto/provider_child.c
parentd5fbd5b4eda592fd43e8688f69f3bac4ca5dd2da (diff)
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_child.c')
-rw-r--r--crypto/provider_child.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/provider_child.c b/crypto/provider_child.c
index cabf3ba19d..b077e95ffc 100644
--- a/crypto/provider_child.c
+++ b/crypto/provider_child.c
@@ -148,11 +148,11 @@ static int provider_create_child_cb(const OSSL_CORE_HANDLE *prov, void *cbdata)
1)) == NULL)
goto err;
- if (!ossl_provider_activate(cprov, 0, 0))
+ if (!ossl_provider_activate(cprov, 0))
goto err;
if (!ossl_provider_set_child(cprov, prov)
- || !ossl_provider_add_to_store(cprov)) {
+ || !ossl_provider_add_to_store(cprov, 0)) {
ossl_provider_deactivate(cprov);
ossl_provider_free(cprov);
goto err;