From owner-svn-ports-head@freebsd.org Sat Sep 7 08:04:54 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 495F3E9E2C; Sat, 7 Sep 2019 08:04:54 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46QRmQ14H7z4Fdc; Sat, 7 Sep 2019 08:04:54 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07FB42669; Sat, 7 Sep 2019 08:04:54 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8784rQT017015; Sat, 7 Sep 2019 08:04:53 GMT (envelope-from mandree@FreeBSD.org) Received: (from mandree@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8784rRk017014; Sat, 7 Sep 2019 08:04:53 GMT (envelope-from mandree@FreeBSD.org) Message-Id: <201909070804.x8784rRk017014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mandree set sender to mandree@FreeBSD.org using -f From: Matthias Andree Date: Sat, 7 Sep 2019 08:04:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r511397 - in head/security/openvpn: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mandree X-SVN-Commit-Paths: in head/security/openvpn: . files X-SVN-Commit-Revision: 511397 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2019 08:04:54 -0000 Author: mandree Date: Sat Sep 7 08:04:53 2019 New Revision: 511397 URL: https://svnweb.freebsd.org/changeset/ports/511397 Log: security/openvpn: regression fix, support LibreSSL again. (I use a different patch than what was submitted by pizzamig@, and have sent our patch upstream.) Remove IGNORE_SSL. While here, remove USE_LDCONFIG to fix a portlint complaint, and fix a typo in a Makefile comment. PR: 238382 Reported by: pizzamig@ Added: head/security/openvpn/files/patch-libressl (contents, props changed) Modified: head/security/openvpn/Makefile Modified: head/security/openvpn/Makefile ============================================================================== --- head/security/openvpn/Makefile Sat Sep 7 07:37:58 2019 (r511396) +++ head/security/openvpn/Makefile Sat Sep 7 08:04:53 2019 (r511397) @@ -23,7 +23,7 @@ SHEBANG_FILES= sample/sample-scripts/verify-cn \ sample/sample-scripts/auth-pam.pl \ sample/sample-scripts/ucn.pl CONFIGURE_ARGS+= --enable-strict -# avoid picking up CMAKE, we don't have cmocka in the tarballs.. +# avoid picking up CMAKE, we don't have cmocka in the tarballs. CONFIGURE_ENV+= ac_cv_prog_CMAKE= CMAKE= # let OpenVPN's configure script pick up the requisite libraries, @@ -62,7 +62,6 @@ X509ALTUSERNAME_PREVENTS_MSG= OpenVPN ${DISTVERSION} c OPENSSL_USES= ssl OPENSSL_CONFIGURE_ON= --with-crypto-library=openssl -IGNORE_SSL= libressl libressl-devel LZ4_CONFIGURE_OFF= --disable-lz4 @@ -72,7 +71,6 @@ MBEDTLS_LIB_DEPENDS= libmbedtls.so:security/mbedtls MBEDTLS_CONFIGURE_ON= --with-crypto-library=mbedtls USE_RC_SUBR= openvpn -USE_LDCONFIG= ${PREFIX}/lib SUB_FILES= pkg-message openvpn-client Added: head/security/openvpn/files/patch-libressl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/openvpn/files/patch-libressl Sat Sep 7 08:04:53 2019 (r511397) @@ -0,0 +1,66 @@ +commit 5bc848a02665f26e83e5dbe8f4ef95f55e5e19bd +Author: Matthias Andree +Date: Mon Aug 12 23:37:52 2019 +0200 + + Fix regression, reinstate LibreSSL support. + + OpenVPN 2.4.6 could be compiled with LibreSSL, 2.4.7 cannot. This was broken + since 9de7fe0a "Add support for tls-ciphersuites for TLS 1.3". + + This patch avoids using TLS 1.3 directly, be it that OpenSSL was compiled + without TLS 1.3 support, or LibreSSL was used. + + This patch was based on an OpenBSD patch by + Jeremie Courreges-Anglas , see + https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/openvpn/patches/patch-src_openvpn_ssl_openssl_c + but was revised to be more obvious and check actual feature macros, + do not rely on current LibreSSL implementation details alone. + + Franco Fichtner reports that OPNsense has been a long-time user + of LibreSSL without reported breakage, see also: + https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238382#c10 + + Signed-off-by: Matthias Andree + +diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c +index a78dae99..293bb192 100644 +--- ./src/openvpn/ssl_openssl.c ++++ ./src/openvpn/ssl_openssl.c +@@ -206,7 +206,7 @@ info_callback(INFO_CALLBACK_SSL_CONST SSL *s, int where, int ret) + int + tls_version_max(void) + { +-#if defined(TLS1_3_VERSION) ++#if defined(TLS1_3_VERSION) && !defined(OPENSSL_NO_TLS1_3) + return TLS_VER_1_3; + #elif defined(TLS1_2_VERSION) || defined(SSL_OP_NO_TLSv1_2) + return TLS_VER_1_2; +@@ -233,7 +233,7 @@ openssl_tls_version(int ver) + { + return TLS1_2_VERSION; + } +-#if defined(TLS1_3_VERSION) ++#if defined(TLS1_3_VERSION) && !defined(OPENSSL_NO_TLS1_3) + else if (ver == TLS_VER_1_3) + { + return TLS1_3_VERSION; +@@ -459,8 +459,8 @@ tls_ctx_restrict_ciphers_tls13(struct tls_root_ctx *ctx, const char *ciphers) + return; + } + +-#if (OPENSSL_VERSION_NUMBER < 0x1010100fL) +- crypto_msg(M_WARN, "Not compiled with OpenSSL 1.1.1 or higher. " ++#if (OPENSSL_VERSION_NUMBER < 0x1010100fL) || !defined(TLS1_3_VERSION) || defined(OPENSSL_NO_TLS1_3) ++ crypto_msg(M_WARN, "Not compiled with OpenSSL 1.1.1 or higher, or without TLS 1.3 support. " + "Ignoring TLS 1.3 only tls-ciphersuites '%s' setting.", + ciphers); + #else +@@ -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(TLS1_3_VERSION) && !defined(OPENSSL_NO_TLS1_3) + if (tls13) + { + SSL_CTX_set_min_proto_version(tls_ctx.ctx, TLS1_3_VERSION);