From owner-svn-ports-head@freebsd.org Sat Jan 20 11:56:16 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68ECFECC749; Sat, 20 Jan 2018 11:56:16 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 408B775DF4; Sat, 20 Jan 2018 11:56:16 +0000 (UTC) (envelope-from woodsb02@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 589E91C05C; Sat, 20 Jan 2018 11:56:15 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0KBuFUp084932; Sat, 20 Jan 2018 11:56:15 GMT (envelope-from woodsb02@FreeBSD.org) Received: (from woodsb02@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0KBuEMW084929; Sat, 20 Jan 2018 11:56:14 GMT (envelope-from woodsb02@FreeBSD.org) Message-Id: <201801201156.w0KBuEMW084929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: woodsb02 set sender to woodsb02@FreeBSD.org using -f From: Ben Woods Date: Sat, 20 Jan 2018 11:56:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459510 - in head/net/qt5-network: . files X-SVN-Group: ports-head X-SVN-Commit-Author: woodsb02 X-SVN-Commit-Paths: in head/net/qt5-network: . files X-SVN-Commit-Revision: 459510 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.25 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, 20 Jan 2018 11:56:16 -0000 Author: woodsb02 Date: Sat Jan 20 11:56:14 2018 New Revision: 459510 URL: https://svnweb.freebsd.org/changeset/ports/459510 Log: net/qt5-network: Fix SSL runtime detection code with LibreSSL Patch taken from OpenBSD ports: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/x11/qt5/qtbase/patches/patch-src_network_ssl_qsslsocket_openssl_symbols_cpp.diff?r1=1.2&r2=1.3 http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/x11/qt5/qtbase/patches/patch-src_network_ssl_qsslsocket_openssl_symbols_p_h.diff?r1=1.2&r2=1.3 PR: 225332 Approved by: tcberner Obtained from: OpenBSD ports Modified: head/net/qt5-network/Makefile head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h Modified: head/net/qt5-network/Makefile ============================================================================== --- head/net/qt5-network/Makefile Sat Jan 20 10:25:50 2018 (r459509) +++ head/net/qt5-network/Makefile Sat Jan 20 11:56:14 2018 (r459510) @@ -2,6 +2,7 @@ PORTNAME= network DISTVERSION= ${QT5_VERSION} +PORTREVISION= 1 CATEGORIES= net ipv6 PKGNAMEPREFIX= qt5- Modified: head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp ============================================================================== --- head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp Sat Jan 20 10:25:50 2018 (r459509) +++ head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp Sat Jan 20 11:56:14 2018 (r459510) @@ -3,9 +3,18 @@ * Prepend the path of the SSL libraries used for building so the same libraries are * found and loaded at runtime. Normal search finds base SSL libraries before ports. * ---- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2016-12-01 08:17:04 UTC +--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2017-11-16 05:15:28 UTC +++ src/network/ssl/qsslsocket_openssl_symbols.cpp -@@ -430,6 +430,7 @@ DEFINEFUNC(void, EC_KEY_free, EC_KEY *ec +@@ -151,7 +151,7 @@ DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int + DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return) + DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return) + DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return) +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if !defined(BN_is_word) + DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return) + #endif + DEFINEFUNC2(BN_ULONG, BN_mod_word, const BIGNUM *a, a, BN_ULONG w, w, return static_cast(-1), return) +@@ -453,6 +453,7 @@ DEFINEFUNC(void, EC_KEY_free, EC_KEY *ecdh, ecdh, retu DEFINEFUNC2(size_t, EC_get_builtin_curves, EC_builtin_curve * r, r, size_t nitems, nitems, return 0, return) #if OPENSSL_VERSION_NUMBER >= 0x10002000L DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return) @@ -35,7 +44,16 @@ if (libcrypto->load() && libssl->load()) { // libssl.so.0 and libcrypto.so.0 found return pair; -@@ -982,8 +983,10 @@ bool q_resolveOpenSslSymbols() +@@ -790,7 +791,7 @@ bool q_resolveOpenSslSymbols() + RESOLVEFUNC(EC_GROUP_get_degree) + #endif + RESOLVEFUNC(BN_num_bits) +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if !defined(BN_is_word) + RESOLVEFUNC(BN_is_word) + #endif + RESOLVEFUNC(BN_mod_word) +@@ -1020,8 +1021,10 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(EC_KEY_free) RESOLVEFUNC(EC_get_builtin_curves) #if OPENSSL_VERSION_NUMBER >= 0x10002000L @@ -47,3 +65,15 @@ #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L #endif // OPENSSL_NO_EC RESOLVEFUNC(PKCS12_parse) +@@ -1030,10 +1033,9 @@ bool q_resolveOpenSslSymbols() + + delete libs.first; + delete libs.second; +- if (!_q_SSLeay || q_SSLeay() >= 0x10100000L) { ++ if (!_q_SSLeay) { + // OpenSSL 1.1 deprecated and removed SSLeay. We consider a failure to + // resolve this symbol as a failure to resolve symbols. +- // The right operand of '||' above ... a bit of paranoia. + qCWarning(lcSsl, "Incompatible version of OpenSSL"); + return false; + } Modified: head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h ============================================================================== --- head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h Sat Jan 20 10:25:50 2018 (r459509) +++ head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h Sat Jan 20 11:56:14 2018 (r459510) @@ -2,9 +2,18 @@ * * check macro is defined instead of version, LibreSSL < 2.5 doesn't have SSL_CTRL_GET_SERVER_TMP_KEY * ---- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig 2016-12-01 08:17:04 UTC +--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig 2017-11-16 05:15:28 UTC +++ src/network/ssl/qsslsocket_openssl_symbols_p.h -@@ -487,11 +487,12 @@ void q_EC_KEY_free(EC_KEY *ecdh); +@@ -228,7 +228,7 @@ int q_BIO_read(BIO *a, void *b, int c); + Q_AUTOTEST_EXPORT BIO_METHOD *q_BIO_s_mem(); + Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c); + int q_BN_num_bits(const BIGNUM *a); +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if !defined(BN_is_word) + int q_BN_is_word(BIGNUM *a, BN_ULONG w); + #else + // BN_is_word is implemented purely as a +@@ -511,11 +511,12 @@ void q_EC_KEY_free(EC_KEY *ecdh); size_t q_EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems); #if OPENSSL_VERSION_NUMBER >= 0x10002000L int q_EC_curve_nist2nid(const char *name);