diff options
author | Stefan Strogin <stefan.strogin@gmail.com> | 2019-02-23 20:23:12 +0200 |
---|---|---|
committer | Aaron Bauman <bman@gentoo.org> | 2019-02-23 19:51:34 -0500 |
commit | f52b8e80566cb783ec05e419c11a1b604b645399 (patch) | |
tree | a84a52c7346c938b5bd2068534cdb7da281401e7 /net-vpn/openvpn | |
parent | sys-apps/openrc: 0.41.1 bump (diff) | |
download | gentoo-f52b8e80566cb783ec05e419c11a1b604b645399.tar.gz gentoo-f52b8e80566cb783ec05e419c11a1b604b645399.tar.bz2 gentoo-f52b8e80566cb783ec05e419c11a1b604b645399.zip |
net-vpn/openvpn: add patch to fix build with LibreSSL
Closes: https://bugs.gentoo.org/678604
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'net-vpn/openvpn')
-rw-r--r-- | net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 | ||||
-rw-r--r-- | net-vpn/openvpn/openvpn-2.4.7-r1.ebuild (renamed from net-vpn/openvpn/openvpn-2.4.7.ebuild) | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch new file mode 100644 index 000000000000..210189cd4d4d --- /dev/null +++ b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch @@ -0,0 +1,49 @@ +From 4faf695e3c42a81131c2aae96c4a60228aa237a5 Mon Sep 17 00:00:00 2001 +From: Stefan Strogin <stefan.strogin@gmail.com> +Date: Sat, 23 Feb 2019 20:13:41 +0200 +Subject: [PATCH] Fix compilation with LibreSSL + +TLS 1.3 is not ready yet in LibreSSL. +Also SSL_get1_supported_ciphers() has been just added into master (not yet +released). + +Upstream-Status: Submitted [https://github.com/OpenVPN/openvpn/pull/123] +Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com> +--- + src/openvpn/ssl_openssl.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c +index a78dae99..6a8fcef3 100644 +--- a/src/openvpn/ssl_openssl.c ++++ b/src/openvpn/ssl_openssl.c +@@ -459,7 +459,7 @@ tls_ctx_restrict_ciphers_tls13(struct tls_root_ctx *ctx, const char *ciphers) + return; + } + +-#if (OPENSSL_VERSION_NUMBER < 0x1010100fL) ++#if (OPENSSL_VERSION_NUMBER < 0x1010100fL) || defined(LIBRESSL_VERSION_NUMBER) + crypto_msg(M_WARN, "Not compiled with OpenSSL 1.1.1 or higher. " + "Ignoring TLS 1.3 only tls-ciphersuites '%s' setting.", + ciphers); +@@ -1846,7 +1846,7 @@ show_available_tls_ciphers_list(const char *cipher_list, + crypto_msg(M_FATAL, "Cannot create SSL_CTX object"); + } + +-#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL) ++#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)) + if (tls13) + { + SSL_CTX_set_min_proto_version(tls_ctx.ctx, TLS1_3_VERSION); +@@ -1867,7 +1867,7 @@ show_available_tls_ciphers_list(const char *cipher_list, + crypto_msg(M_FATAL, "Cannot create SSL object"); + } + +-#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) ++#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) || defined(LIBRESSL_VERSION_NUMBER) + STACK_OF(SSL_CIPHER) *sk = SSL_get_ciphers(ssl); + #else + STACK_OF(SSL_CIPHER) *sk = SSL_get1_supported_ciphers(ssl); +-- +2.20.1 + diff --git a/net-vpn/openvpn/openvpn-2.4.7.ebuild b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild index 486507300fe4..0ae13d41d8c6 100644 --- a/net-vpn/openvpn/openvpn-2.4.7.ebuild +++ b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild @@ -50,6 +50,7 @@ CONFIG_CHECK="~TUN" PATCHES=( "${FILESDIR}/${PN}-external-cmocka.patch" "${FILESDIR}/${PN}-2.4.5-libressl-macro-fix.patch" + "${FILESDIR}/${P}-libressl.patch" ) pkg_setup() { |