From c828ffc648eebda20e2f9087248944fa0f52a582 Mon Sep 17 00:00:00 2001 From: Emmanuel Deloget Date: Fri, 17 Feb 2017 23:00:52 +0100 Subject: [PATCH] OpenSSL: SSLeay symbols are no longer available in OpenSSL 1.1 The old symbols do not exist anymore but the library gained new equivalent symbols (OSSL). Use them instead of the old ones Signed-off-by: Emmanuel Deloget Acked-by: Steffan Karger Message-Id: <9ce17efda7b1ed100e73554b1916c0bfa687d9d1.1487368114.git.logout@free.fr> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14089.html Signed-off-by: Gert Doering --- src/openvpn/openssl_compat.h | 5 +++++ src/openvpn/ssl_openssl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index e98e8dffc..92f014d57 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -307,4 +307,9 @@ RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data) } #endif +/* SSLeay symbols have been renamed in OpenSSL 1.1 */ +#if !defined(RSA_F_RSA_OSSL_PRIVATE_ENCRYPT) +#define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT RSA_F_RSA_EAY_PRIVATE_ENCRYPT +#endif + #endif /* OPENSSL_COMPAT_H_ */ diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index f011e0670..d7cc2ba44 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -995,7 +995,7 @@ rsa_priv_enc(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, i if (padding != RSA_PKCS1_PADDING) { - RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, RSA_R_UNKNOWN_PADDING_TYPE); + RSAerr(RSA_F_RSA_OSSL_PRIVATE_ENCRYPT, RSA_R_UNKNOWN_PADDING_TYPE); goto done; } -- 2.47.2