From eb2263da9abf3676cbcac672eee8a26416a8c309 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 21 Jun 2021 11:34:04 +0100 Subject: 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 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15854) --- crypto/provider_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/provider_conf.c') diff --git a/crypto/provider_conf.c b/crypto/provider_conf.c index 8e83264dc6..1e59e959e3 100644 --- a/crypto/provider_conf.c +++ b/crypto/provider_conf.c @@ -171,9 +171,9 @@ static int provider_conf_load(OSSL_LIB_CTX *libctx, const char *name, ok = provider_conf_params(prov, NULL, NULL, value, cnf); if (ok) { - if (!ossl_provider_activate(prov, 0, 1)) { + if (!ossl_provider_activate(prov, 1)) { ok = 0; - } else if (!ossl_provider_add_to_store(prov)) { + } else if (!ossl_provider_add_to_store(prov, 0)) { ossl_provider_deactivate(prov); ok = 0; } else { -- cgit v1.2.3-70-g09d2