From 5a112250745b69a3ca2f3e00aed9ea02b2e717bb Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 19 Oct 2021 20:31:17 +0200 Subject: [PATCH] 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 --- src/openvpn/crypto_openssl.c | 2 +- src/openvpn/openssl_compat.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 * -- 2.47.2