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:18:25 +0000 (10:18 +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)

crypto/evp/evp_fetch.c

index bd816be5f4feb90c4ea5e45d3994d78651a757ce..7008f425490193421e9abfdaa53924fe7468db11 100644 (file)
@@ -334,7 +334,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);
             }