From: Neil Horman Date: Thu, 7 May 2026 21:29:37 +0000 (-0400) Subject: Make EVP_MAC not do refcounting X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8bc71e66648ed22dae9d02053aa630e578b551e;p=thirdparty%2Fopenssl.git Make EVP_MAC not do refcounting Reviewed-by: Bob Beck Reviewed-by: Nikola Pajkovsky MergeDate: Thu Jun 25 21:25:53 2026 (Merged from https://github.com/openssl/openssl/pull/31143) --- diff --git a/crypto/evp/mac_meth.c b/crypto/evp/mac_meth.c index ba47e958703..439a6fc2cf1 100644 --- a/crypto/evp/mac_meth.c +++ b/crypto/evp/mac_meth.c @@ -182,12 +182,18 @@ EVP_MAC *EVP_MAC_fetch(OSSL_LIB_CTX *libctx, const char *algorithm, int EVP_MAC_up_ref(EVP_MAC *mac) { +#ifdef OPENSSL_NO_CACHED_FETCH return evp_mac_up_ref(mac); +#else + return 1; +#endif } void EVP_MAC_free(EVP_MAC *mac) { +#ifdef OPENSSL_NO_CACHED_FETCH evp_mac_free(mac); +#endif } const OSSL_PROVIDER *EVP_MAC_get0_provider(const EVP_MAC *mac)