Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/
Date: Sun, 24 Feb 2019 00:51:51
Message-Id: 1550969494.f52b8e80566cb783ec05e419c11a1b604b645399.bman@gentoo
1 commit: f52b8e80566cb783ec05e419c11a1b604b645399
2 Author: Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
3 AuthorDate: Sat Feb 23 18:23:12 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 24 00:51:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80
7
8 net-vpn/openvpn: add patch to fix build with LibreSSL
9
10 Closes: https://bugs.gentoo.org/678604
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12
12 Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/11145
14 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
15
16 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++++++++++++++++++++++
17 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} | 1 +
18 2 files changed, 50 insertions(+)
19
20 diff --git a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
21 new file mode 100644
22 index 00000000000..210189cd4d4
23 --- /dev/null
24 +++ b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
25 @@ -0,0 +1,49 @@
26 +From 4faf695e3c42a81131c2aae96c4a60228aa237a5 Mon Sep 17 00:00:00 2001
27 +From: Stefan Strogin <stefan.strogin@×××××.com>
28 +Date: Sat, 23 Feb 2019 20:13:41 +0200
29 +Subject: [PATCH] Fix compilation with LibreSSL
30 +
31 +TLS 1.3 is not ready yet in LibreSSL.
32 +Also SSL_get1_supported_ciphers() has been just added into master (not yet
33 +released).
34 +
35 +Upstream-Status: Submitted [https://github.com/OpenVPN/openvpn/pull/123]
36 +Signed-off-by: Stefan Strogin <stefan.strogin@×××××.com>
37 +---
38 + src/openvpn/ssl_openssl.c | 6 +++---
39 + 1 file changed, 3 insertions(+), 3 deletions(-)
40 +
41 +diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
42 +index a78dae99..6a8fcef3 100644
43 +--- a/src/openvpn/ssl_openssl.c
44 ++++ b/src/openvpn/ssl_openssl.c
45 +@@ -459,7 +459,7 @@ tls_ctx_restrict_ciphers_tls13(struct tls_root_ctx *ctx, const char *ciphers)
46 + return;
47 + }
48 +
49 +-#if (OPENSSL_VERSION_NUMBER < 0x1010100fL)
50 ++#if (OPENSSL_VERSION_NUMBER < 0x1010100fL) || defined(LIBRESSL_VERSION_NUMBER)
51 + crypto_msg(M_WARN, "Not compiled with OpenSSL 1.1.1 or higher. "
52 + "Ignoring TLS 1.3 only tls-ciphersuites '%s' setting.",
53 + ciphers);
54 +@@ -1846,7 +1846,7 @@ show_available_tls_ciphers_list(const char *cipher_list,
55 + crypto_msg(M_FATAL, "Cannot create SSL_CTX object");
56 + }
57 +
58 +-#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL)
59 ++#if (OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER))
60 + if (tls13)
61 + {
62 + SSL_CTX_set_min_proto_version(tls_ctx.ctx, TLS1_3_VERSION);
63 +@@ -1867,7 +1867,7 @@ show_available_tls_ciphers_list(const char *cipher_list,
64 + crypto_msg(M_FATAL, "Cannot create SSL object");
65 + }
66 +
67 +-#if (OPENSSL_VERSION_NUMBER < 0x1010000fL)
68 ++#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) || defined(LIBRESSL_VERSION_NUMBER)
69 + STACK_OF(SSL_CIPHER) *sk = SSL_get_ciphers(ssl);
70 + #else
71 + STACK_OF(SSL_CIPHER) *sk = SSL_get1_supported_ciphers(ssl);
72 +--
73 +2.20.1
74 +
75
76 diff --git a/net-vpn/openvpn/openvpn-2.4.7.ebuild b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
77 similarity index 99%
78 rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
79 rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
80 index 486507300fe..0ae13d41d8c 100644
81 --- a/net-vpn/openvpn/openvpn-2.4.7.ebuild
82 +++ b/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
83 @@ -50,6 +50,7 @@ CONFIG_CHECK="~TUN"
84 PATCHES=(
85 "${FILESDIR}/${PN}-external-cmocka.patch"
86 "${FILESDIR}/${PN}-2.4.5-libressl-macro-fix.patch"
87 + "${FILESDIR}/${P}-libressl.patch"
88 )
89
90 pkg_setup() {