]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Take into account no_store when pushing algorithm
authorDmitry Belyavskiy <beldmit@gmail.com>
Wed, 18 Dec 2024 20:28:14 +0000 (21:28 +0100)
committerDmitry Belyavskiy <beldmit@gmail.com>
Mon, 13 Jan 2025 09:48:15 +0000 (10:48 +0100)
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 <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(cherry picked from commit b3bb214720f20f3b126ae4b9c330e9a48b835415)

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/26231)

crypto/core_fetch.c

index 38db36ee1f75e928893a1da65133531817ddad37..f0f7dc2010bb6663eea1bac121c2b74898ffe758 100644 (file)
@@ -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 */