From: Dmitry Belyavskiy Date: Wed, 18 Dec 2024 20:28:14 +0000 (+0100) Subject: Take into account no_store when pushing algorithm X-Git-Tag: openssl-3.1.8~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b3b4027c61fc4bff2f7d6b9318c5ec8d996ded4;p=thirdparty%2Fopenssl.git Take into account no_store when pushing algorithm When we put algorithm to the store, we have a fallback to the OSSL_LIB_CTX level store when store is NULL. Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (cherry picked from commit b3bb214720f20f3b126ae4b9c330e9a48b835415) Reviewed-by: Tom Cosgrove (Merged from https://github.com/openssl/openssl/pull/26231) --- diff --git a/crypto/core_fetch.c b/crypto/core_fetch.c index 38db36ee1f7..f0f7dc2010b 100644 --- a/crypto/core_fetch.c +++ b/crypto/core_fetch.c @@ -120,7 +120,8 @@ static void ossl_method_construct_this(OSSL_PROVIDER *provider, * It is *expected* that the put function increments the refcnt * of the passed method. */ - data->mcm->put(data->store, method, provider, algo->algorithm_names, + data->mcm->put(no_store ? data->store : NULL, + method, provider, algo->algorithm_names, algo->property_definition, data->mcm_data); /* refcnt-- because we're dropping the reference */