]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
evp_fetch.c: Check meth_id instead of name_id
authorsashan <anedvedicky@gmail.com>
Mon, 8 Jan 2024 21:53:42 +0000 (22:53 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 11 Jan 2024 09:26:55 +0000 (10:26 +0100)
Fixes #23226

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23238)

(cherry picked from commit da840c3775f52fc9766c654b5ad6ee031ffc9fd9)

crypto/evp/evp_fetch.c

index 3d86fa3702e932f03eb0a191c8bd8281e8b37f25..5e7ce3de50bb6649199bbbf5ffaec8d90b8260c1 100644 (file)
@@ -333,7 +333,7 @@ inner_evp_generic_fetch(struct evp_method_data_st *methdata,
                 method = NULL;
             } else {
                 meth_id = evp_method_id(name_id, operation_id);
-                if (name_id != 0)
+                if (meth_id != 0)
                     ossl_method_store_cache_set(store, prov, meth_id, propq,
                                                 method, up_ref_method, free_method);
             }