summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <stefan.strogin@gmail.com>2019-03-04 22:24:24 +0200
committerPatrick McLean <chutzpah@gentoo.org>2019-03-12 17:43:18 -0700
commitc16af66cd6e5903520a80e73c6f594449e654a5f (patch)
tree388fa6489bca19359d212d15c99605a24cb72bdf /net-vpn/openvpn
parentsys-apps/rng-tools: remove old (diff)
downloadgentoo-c16af66cd6e5903520a80e73c6f594449e654a5f.tar.gz
gentoo-c16af66cd6e5903520a80e73c6f594449e654a5f.tar.bz2
gentoo-c16af66cd6e5903520a80e73c6f594449e654a5f.zip
net-vpn/openvpn: update LibreSSL patch to accepted upstream
Bug: 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/11260 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'net-vpn/openvpn')
-rw-r--r--net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch133
-rw-r--r--net-vpn/openvpn/openvpn-2.4.7-r2.ebuild (renamed from net-vpn/openvpn/openvpn-2.4.7-r1.ebuild)0
2 files changed, 113 insertions, 20 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
index 210189cd4d4d..414f132b3361 100644
--- a/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
+++ b/net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch
@@ -1,49 +1,142 @@
-From 4faf695e3c42a81131c2aae96c4a60228aa237a5 Mon Sep 17 00:00:00 2001
+From a47508606be2c6359d4b27c3b65b72dfe4786222 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
+Date: Mon, 25 Feb 2019 20:35:31 +0200
+Subject: [PATCH] Use correct ifdefs for LibreSSL support
-TLS 1.3 is not ready yet in LibreSSL.
-Also SSL_get1_supported_ciphers() has been just added into master (not yet
-released).
+- TLS 1.3 is not ready yet in LibreSSL. Also there is a theoretical
+possibility of OpenSSL >=1.1.1 built without TLS 1.3 support.
+- EC_KEY_METHOD API and SSL_get1_supported_ciphers are added into LibreSSL
+master (not yet released in 2.9.0).
+- Some methods that are available since LibreSSL 2.7.0 were thrown away
+in ssl_openssl.c regardless of LibreSSL version. Use them with newer
+LibreSSL.
-Upstream-Status: Submitted [https://github.com/OpenVPN/openvpn/pull/123]
Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
+Acked-by: Arne Schwabe <arne@rfc2549.org>
+Message-Id: <20190225183531.27399-1-stefan.strogin@gmail.com>
+URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering <gert@greenie.muc.de>
+Upstream-Status: Accepted
+[https://github.com/OpenVPN/openvpn/commit/a47508606be2c6359d4b27c3b65b72dfe4786222]
---
- src/openvpn/ssl_openssl.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ src/openvpn/ssl_openssl.c | 33 +++++++++++++++++++++------------
+ 1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
-index a78dae99..6a8fcef3 100644
+index ddb78da7..8bcebac4 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)
+@@ -465,7 +465,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,
++#if !defined(TLS1_3_VERSION)
+ crypto_msg(M_WARN, "Not compiled with OpenSSL 1.1.1 or higher. "
+ "Ignoring TLS 1.3 only tls-ciphersuites '%s' setting.",
+ ciphers);
+@@ -526,7 +526,8 @@ tls_ctx_check_cert_time(const struct tls_root_ctx *ctx)
+
+ ASSERT(ctx);
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL
+ /* OpenSSL 1.0.2 and up */
+ cert = SSL_CTX_get0_certificate(ctx->ctx);
+ #else
+@@ -561,7 +562,8 @@ tls_ctx_check_cert_time(const struct tls_root_ctx *ctx)
+ }
+
+ cleanup:
+-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10002000L \
++ || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+
+-#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x2090000fL) \
++ && !defined(OPENSSL_NO_EC)
+
+ /* called when EC_KEY is destroyed */
+ static void
+@@ -1331,7 +1335,7 @@ err:
+ }
+ return 0;
+ }
+-#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev */
++#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev && !defined(OPENSSL_NO_EC) */
+
+ int
+ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
+@@ -1340,7 +1344,8 @@ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
+
+ ASSERT(NULL != ctx);
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL
+ /* OpenSSL 1.0.2 and up */
+ X509 *cert = SSL_CTX_get0_certificate(ctx->ctx);
+ #else
+@@ -1362,7 +1367,9 @@ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
+ goto cleanup;
+ }
+ }
+-#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x2090000fL) \
++ && !defined(OPENSSL_NO_EC)
+ else if (EVP_PKEY_id(pkey) == EVP_PKEY_EC)
+ {
+ if (!tls_ctx_use_external_ec_key(ctx, pkey))
+@@ -1375,17 +1382,18 @@ tls_ctx_use_management_external_key(struct tls_root_ctx *ctx)
+ crypto_msg(M_WARN, "management-external-key requires an RSA or EC certificate");
+ goto cleanup;
+ }
+-#else /* if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER) */
++#else /* OPENSSL_VERSION_NUMBER > 1.1.0 dev && !defined(OPENSSL_NO_EC) */
+ else
+ {
+ crypto_msg(M_WARN, "management-external-key requires an RSA certificate");
+ goto cleanup;
+ }
+-#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev */
++#endif /* OPENSSL_VERSION_NUMBER > 1.1.0 dev && !defined(OPENSSL_NO_EC) */
+
+ ret = 0;
+ cleanup:
+-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10002000L \
++ || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ if (ssl)
+ {
+ SSL_free(ssl);
+@@ -1998,7 +2006,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 defined(TLS1_3_VERSION)
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,
+@@ -2019,7 +2027,8 @@ 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)
++#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <= 0x2090000fL)
STACK_OF(SSL_CIPHER) *sk = SSL_get_ciphers(ssl);
#else
STACK_OF(SSL_CIPHER) *sk = SSL_get1_supported_ciphers(ssl);
--
-2.20.1
+2.21.0
diff --git a/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild b/net-vpn/openvpn/openvpn-2.4.7-r2.ebuild
index 0ae13d41d8c6..0ae13d41d8c6 100644
--- a/net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.7-r2.ebuild