From: Arne Schwabe Date: Tue, 19 Oct 2021 18:31:17 +0000 (+0200) Subject: Use EVP_MD_get0_name instead EV_MD_name X-Git-Tag: v2.6_beta1~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a112250745b69a3ca2f3e00aed9ea02b2e717bb;p=thirdparty%2Fopenvpn.git Use EVP_MD_get0_name instead EV_MD_name Use the new name for the function as it indicates with get0 the ownership of the returned value Signed-off-by: Arne Schwabe Acked-by: Max Fillinger Message-Id: <20211019183127.614175-12-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23016.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index 66cc38255..f4b209228 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -907,7 +907,7 @@ md_kt_name(const EVP_MD *kt) { return "[null-digest]"; } - return EVP_MD_name(kt); + return EVP_MD_get0_name(kt); } unsigned char diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index 9049b09d6..cbd7fd1d2 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -756,6 +756,8 @@ int EVP_PKEY_get_group_name(EVP_PKEY *pkey, char *gname, size_t gname_sz, #endif #if OPENSSL_VERSION_NUMBER < 0x30000000L +#define EVP_MD_get0_name EVP_MD_name + /* Mimics the functions but only when the default context without * options is chosen */ static inline const EVP_CIPHER *