[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-03-12 Thread Patrick McLean
commit: c16af66cd6e5903520a80e73c6f594449e654a5f
Author: Stefan Strogin  gmail  com>
AuthorDate: Mon Mar  4 20:24:24 2019 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Mar 13 00:43:18 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16af66c

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11260
Signed-off-by: Patrick McLean  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 133 +
 ...vpn-2.4.7-r1.ebuild => openvpn-2.4.7-r2.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 210189cd4d4..414f132b336 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 
-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 
+Acked-by: Arne Schwabe 
+Message-Id: <20190225183531.27399-1-stefan.stro...@gmail.com>
+URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18239.html
+Signed-off-by: Gert Doering 
+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 >= 0x207fL
+ /* 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 < 
0x207fL)
+ SSL_free(ssl);
+ #endif
+ return;
+@@ -1209,7 +1211,9 @@ err:
+ return 0;
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER > 0x1010L && !defined(OPENSSL_NO_EC) && 
!defined(LIBRESSL_VERSION_NUMBER)
++#if ((OPENSSL_VERSION_NUMBER > 0x1010L && 
!defined(LIBRESSL_VERSION_NUMBER)) \
++ || LIBRESSL_VERSION_NUMBER > 0x209fL) \
++&& !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_

[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2019-02-23 Thread Aaron Bauman
commit: f52b8e80566cb783ec05e419c11a1b604b645399
Author: Stefan Strogin  gmail  com>
AuthorDate: Sat Feb 23 18:23:12 2019 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Sun Feb 24 00:51:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52b8e80

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  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11145
Signed-off-by: Aaron Bauman  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.4.7-libressl.patch | 49 ++
 ...penvpn-2.4.7.ebuild => openvpn-2.4.7-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

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 000..210189cd4d4
--- /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 
+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 
+---
+ 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 < 0x101fL)
++#if (OPENSSL_VERSION_NUMBER < 0x101fL) || 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
similarity index 99%
rename from net-vpn/openvpn/openvpn-2.4.7.ebuild
rename to net-vpn/openvpn/openvpn-2.4.7-r1.ebuild
index 486507300fe..0ae13d41d8c 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()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2020-11-25 Thread Patrick McLean
commit: 754719bf31995aef24556009bc2a422262655bad
Author: Patrick McLean  sony  com>
AuthorDate: Thu Nov 26 02:10:37 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Thu Nov 26 02:10:51 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754719bf

net-vpn/openvpn-2.5.0-r1: Add patch to fix libressl (bug #651228)

Closes: https://bugs.gentoo.org/651228
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Patrick McLean  gentoo.org>

 .../files/openvpn-2.5.0-auth-pam-missing-header.patch| 12 
 net-vpn/openvpn/openvpn-2.5.0-r1.ebuild  |  5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch 
b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
new file mode 100644
index 000..2e48bd6b387
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.5.0-auth-pam-missing-header.patch
@@ -0,0 +1,12 @@
+diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
+index f537652e..29306310 100644
+--- a/src/plugins/auth-pam/auth-pam.c
 b/src/plugins/auth-pam/auth-pam.c
+@@ -47,6 +47,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "utils.h"
+ 
+ #include 

diff --git a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild 
b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
index 35f18565020..575fb576481 100644
--- a/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
+++ b/net-vpn/openvpn/openvpn-2.5.0-r1.ebuild
@@ -46,9 +46,12 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-openvpn )
 "
 
-CONFIG_CHECK="~TUN"
+PATCHES=(
+   "${FILESDIR}/openvpn-2.5.0-auth-pam-missing-header.patch"
+)
 
 pkg_setup() {
+   local CONFIG_CHECK="~TUN"
linux-info_pkg_setup
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2018-04-16 Thread Jason Donenfeld
commit: 5788ebc0a13f19bb93a49f2f9b8d10902cb0fcc1
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr 16 17:29:55 2018 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Mon Apr 16 17:30:20 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5788ebc0

net-vpn/openvpn: fix compilation with libressl

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/openvpn-2.4.5-libressl-macro-fix.patch   | 63 ++
 net-vpn/openvpn/openvpn-2.4.5.ebuild   |  1 +
 2 files changed, 64 insertions(+)

diff --git a/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch 
b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
new file mode 100644
index 000..13b97600952
--- /dev/null
+++ b/net-vpn/openvpn/files/openvpn-2.4.5-libressl-macro-fix.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 626b4dd..2a8e87f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -948,6 +948,18 @@ if test "${with_crypto_library}" = "openssl"; then
+   EC_GROUP_order_bits
+   ]
+   )
++  AC_CHECK_DECLS(
++  [
++  SSL_CTX_get_min_proto_version,
++  SSL_CTX_get_max_proto_version,
++  SSL_CTX_set_min_proto_version,
++  SSL_CTX_set_max_proto_version,
++  ],
++  ,
++  ,
++  [[#include ]]
++
++  )
+ 
+   CFLAGS="${saved_CFLAGS}"
+   LIBS="${saved_LIBS}"
+diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
+index d375fab..340d452 100644
+--- a/src/openvpn/openssl_compat.h
 b/src/openvpn/openssl_compat.h
+@@ -661,7 +661,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
+ #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT   RSA_F_RSA_EAY_PRIVATE_ENCRYPT
+ #endif
+ 
+-#ifndef SSL_CTX_get_min_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MIN_PROTO_VERSION
+ /** Return the min SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -684,7 +684,7 @@ SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_min_proto_version */
+ 
+-#ifndef SSL_CTX_get_max_proto_version
++#if !HAVE_DECL_SSL_CTX_GET_MAX_PROTO_VERSION
+ /** Return the max SSL protocol version currently enabled in the context.
+  *  If no valid version >= TLS1.0 is found, return 0. */
+ static inline int
+@@ -707,7 +707,7 @@ SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
+ }
+ #endif /* SSL_CTX_get_max_proto_version */
+ 
+-#ifndef SSL_CTX_set_min_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MIN_PROTO_VERSION
+ /** Mimics SSL_CTX_set_min_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long tls_ver_min)
+@@ -736,7 +736,7 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, long 
tls_ver_min)
+ }
+ #endif /* SSL_CTX_set_min_proto_version */
+ 
+-#ifndef SSL_CTX_set_max_proto_version
++#if !HAVE_DECL_SSL_CTX_SET_MAX_PROTO_VERSION
+ /** Mimics SSL_CTX_set_max_proto_version for OpenSSL < 1.1 */
+ static inline int
+ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, long tls_ver_max)

diff --git a/net-vpn/openvpn/openvpn-2.4.5.ebuild 
b/net-vpn/openvpn/openvpn-2.4.5.ebuild
index 7143fb14c09..d93cd5da7e5 100644
--- a/net-vpn/openvpn/openvpn-2.4.5.ebuild
+++ b/net-vpn/openvpn/openvpn-2.4.5.ebuild
@@ -49,6 +49,7 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
"${FILESDIR}/${PN}-external-cmocka.patch"
+   "${FILESDIR}/${P}-libressl-macro-fix.patch"
 )
 
 pkg_setup()  {



[gentoo-commits] repo/gentoo:master commit in: net-vpn/openvpn/, net-vpn/openvpn/files/

2023-03-11 Thread Sam James
commit: da23c443933f51b4a9fd9ff98175f804dc52af37
Author: Azamat H. Hackimov  gmail  com>
AuthorDate: Mon Feb 20 14:35:51 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Mar 11 16:25:50 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da23c443

net-vpn/openvpn: fix crushing multiple instances

In environment with multiple openvpn's instances if one of them get
crushed, trying to restart it will result to stoping ALL of other
openvpn instances. Introduced `--config "${VPNCONF}"` option to prevent
it as suggested by Zhixu Liu.

Closes: https://bugs.gentoo.org/829949
Suggested-by: Zhixu Liu  gmail.com>
Signed-off-by: Azamat H. Hackimov  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29685
Signed-off-by: Sam James  gentoo.org>

 net-vpn/openvpn/files/openvpn-2.1.init   | 5 +++--
 net-vpn/openvpn/{openvpn-2.5.2-r2.ebuild => openvpn-2.5.2-r3.ebuild} | 0
 net-vpn/openvpn/{openvpn-2.5.6.ebuild => openvpn-2.5.6-r1.ebuild}| 0
 net-vpn/openvpn/{openvpn-2.5.7.ebuild => openvpn-2.5.7-r1.ebuild}| 0
 4 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net-vpn/openvpn/files/openvpn-2.1.init 
b/net-vpn/openvpn/files/openvpn-2.1.init
index ba05689a1e09..3af33f5e6392 100644
--- a/net-vpn/openvpn/files/openvpn-2.1.init
+++ b/net-vpn/openvpn/files/openvpn-2.1.init
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 VPNDIR=${VPNDIR:-/etc/openvpn}
@@ -126,7 +126,8 @@ stop() {
 
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --quiet \
-   --exec /usr/sbin/openvpn --pidfile "${VPNPID}"
+   --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
+   -- --config "${VPNCONF}"
eend $?
 }
 

diff --git a/net-vpn/openvpn/openvpn-2.5.2-r2.ebuild 
b/net-vpn/openvpn/openvpn-2.5.2-r3.ebuild
similarity index 100%
rename from net-vpn/openvpn/openvpn-2.5.2-r2.ebuild
rename to net-vpn/openvpn/openvpn-2.5.2-r3.ebuild

diff --git a/net-vpn/openvpn/openvpn-2.5.6.ebuild 
b/net-vpn/openvpn/openvpn-2.5.6-r1.ebuild
similarity index 100%
rename from net-vpn/openvpn/openvpn-2.5.6.ebuild
rename to net-vpn/openvpn/openvpn-2.5.6-r1.ebuild

diff --git a/net-vpn/openvpn/openvpn-2.5.7.ebuild 
b/net-vpn/openvpn/openvpn-2.5.7-r1.ebuild
similarity index 100%
rename from net-vpn/openvpn/openvpn-2.5.7.ebuild
rename to net-vpn/openvpn/openvpn-2.5.7-r1.ebuild