Message ID | 20211019183127.614175-12-arne@rfc2549.org |
---|---|
State | Accepted |
Headers | show |
Series | OpenSSL 3.0 improvements for OpenVPN | expand |
On 19/10/2021 20:31, Arne Schwabe wrote: > Use the new name for the function as it indicates with > get0 the ownership of the returned value > > Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Max Fillinger <maximilian.fillinger@foxcrypto.com> Looks good to me. Typo: "USe"
Some context massaging required (ssl_compat context, 08, v3->v4, ...) 1.1.1 builds & passes "make check" just fine. 3.0.0 shows the same failures as before (ncp_testdriver, t_lpback.sh), which means "nothing new broke", so this change seems to be good enough. Your patch has been applied to the master branch. commit 5a112250745b69a3ca2f3e00aed9ea02b2e717bb Author: Arne Schwabe Date: Tue Oct 19 20:31:17 2021 +0200 Use EVP_MD_get0_name instead EV_MD_name Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Max Fillinger <maximilian.fillinger@foxcrypto.com> 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 <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index b10bd7cd5..407ea4a7c 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -916,7 +916,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 0893bfbb2..2aa718a33 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -751,6 +751,8 @@ int EVP_PKEY_get_group_name(EVP_PKEY *pkey, char *gname, size_t gname_sz, /** Mimics SSL_CTX_new_ex for OpenSSL < 3 */ #if OPENSSL_VERSION_NUMBER < 0x30000000L +#define EVP_MD_get0_name EVP_MD_name + static inline SSL_CTX * SSL_CTX_new_ex(void *libctx, const char *propq, const SSL_METHOD *method) {
Use the new name for the function as it indicates with get0 the ownership of the returned value Signed-off-by: Arne Schwabe <arne@rfc2549.org> --- src/openvpn/crypto_openssl.c | 2 +- src/openvpn/openssl_compat.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)