From owner-svn-ports-all@freebsd.org Mon Nov 26 20:29:02 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A6FA11433FB; Mon, 26 Nov 2018 20:29:02 +0000 (UTC) (envelope-from tcberner@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 2EADD8736C; Mon, 26 Nov 2018 20:29:02 +0000 (UTC) (envelope-from tcberner@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 0F90410DE7; Mon, 26 Nov 2018 20:29:02 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQKT1X3007264; Mon, 26 Nov 2018 20:29:01 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQKT1k9007257; Mon, 26 Nov 2018 20:29:01 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201811262029.wAQKT1k9007257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Mon, 26 Nov 2018 20:29:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r485965 - in head/net/qt5-network: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: in head/net/qt5-network: . files X-SVN-Commit-Revision: 485965 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2EADD8736C X-Spamd-Result: default: False [1.62 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.68)[0.678,0]; NEURAL_SPAM_SHORT(0.30)[0.295,0]; NEURAL_SPAM_MEDIUM(0.65)[0.649,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 20:29:02 -0000 Author: tcberner Date: Mon Nov 26 20:29:01 2018 New Revision: 485965 URL: https://svnweb.freebsd.org/changeset/ports/485965 Log: net/qt5-network: fix build with LibreSSL PR: 228344 Submitted by: Walter Schwarzenfeld Added: head/net/qt5-network/files/patch-qsslcontext_openssl.cpp (contents, props changed) 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 Mon Nov 26 19:01:17 2018 (r485964) +++ head/net/qt5-network/Makefile Mon Nov 26 20:29:01 2018 (r485965) @@ -2,6 +2,7 @@ PORTNAME= network DISTVERSION= ${QT5_VERSION} +PORTREVISION= 1 CATEGORIES= net ipv6 PKGNAMEPREFIX= qt5- Added: head/net/qt5-network/files/patch-qsslcontext_openssl.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/qt5-network/files/patch-qsslcontext_openssl.cpp Mon Nov 26 20:29:01 2018 (r485965) @@ -0,0 +1,15 @@ +* +* Fix for libressl atter openssl111 API change +* +* +--- src/network/ssl/qsslcontext_openssl.cpp.orig 2018-10-21 16:58:39 UTC ++++ src/network/ssl/qsslcontext_openssl.cpp +@@ -248,7 +248,7 @@ void QSslContext::applyBackendConfig(QSs + if (sslContext->sslConfiguration.backendConfiguration().isEmpty()) + return; + +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) { + QSharedPointer cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free); + if (cctx) { 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 Mon Nov 26 19:01:17 2018 (r485964) +++ head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp Mon Nov 26 20:29:01 2018 (r485965) @@ -3,8 +3,13 @@ * 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 2018-02-08 19:24:48.000000000 +0100 -+++ src/network/ssl/qsslsocket_openssl_symbols.cpp 2018-06-29 12:22:11.265885000 +0200 +* = = = = = = = = = = = = = = = = = = = = = = +* +* Fix for libressl atter openssl111 API change +* +* +--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2018-10-21 15:55:52 UTC ++++ src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -150,6 +150,14 @@ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return) DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return) @@ -38,7 +43,16 @@ DEFINEFUNC(EVP_PKEY *, X509_get_pubkey, X509 *a, a, return 0, return) DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_verify_cb verify_cb, verify_cb, return, DUMMYARG) DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return) -@@ -524,6 +535,9 @@ DEFINEFUNC(void, EC_KEY_free, EC_KEY *ec +@@ -406,7 +417,7 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, + DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return) + DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return) + DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return 0, return) +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return 0, return); + DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return); + DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return); +@@ -537,6 +548,9 @@ DEFINEFUNC(void, EC_KEY_free, EC_KEY *ec 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) @@ -48,7 +62,7 @@ #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L #endif // OPENSSL_NO_EC -@@ -769,8 +783,8 @@ static QPair loadO +@@ -782,8 +796,8 @@ static QPair loadO #endif #if defined(SHLIB_VERSION_NUMBER) && !defined(Q_OS_QNX) // on QNX, the libs are always libssl.so and libcrypto.so // first attempt: the canonical name is libssl.so. @@ -59,7 +73,7 @@ if (libcrypto->load() && libssl->load()) { // libssl.so. and libcrypto.so. found return pair; -@@ -787,8 +801,8 @@ static QPair loadO +@@ -800,8 +814,8 @@ static QPair loadO // macOS's /usr/lib/libssl.dylib, /usr/lib/libcrypto.dylib will be picked up in the third // attempt, _after_ /Contents/Frameworks has been searched. // iOS does not ship a system libssl.dylib, libcrypto.dylib in the first place. @@ -70,7 +84,7 @@ if (libcrypto->load() && libssl->load()) { // libssl.so.0 and libcrypto.so.0 found return pair; -@@ -872,17 +886,30 @@ bool q_resolveOpenSslSymbols() +@@ -885,17 +899,30 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(EVP_CIPHER_CTX_reset) RESOLVEFUNC(EVP_PKEY_base_id) RESOLVEFUNC(RSA_bits) @@ -102,7 +116,7 @@ RESOLVEFUNC(SSL_get_session) RESOLVEFUNC(CRYPTO_get_ex_new_index) RESOLVEFUNC(TLS_method) -@@ -891,7 +918,9 @@ bool q_resolveOpenSslSymbols() +@@ -904,7 +931,9 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(X509_STORE_CTX_get0_chain) RESOLVEFUNC(X509_getm_notBefore) RESOLVEFUNC(X509_getm_notAfter) @@ -112,7 +126,7 @@ RESOLVEFUNC(X509_get_pubkey) RESOLVEFUNC(X509_STORE_set_verify_cb) RESOLVEFUNC(CRYPTO_free) -@@ -908,7 +937,9 @@ bool q_resolveOpenSslSymbols() +@@ -921,7 +950,9 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint) RESOLVEFUNC(DH_bits) @@ -122,7 +136,7 @@ #else // !opensslv11 -@@ -979,10 +1010,9 @@ bool q_resolveOpenSslSymbols() +@@ -992,10 +1023,9 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(OPENSSL_add_all_algorithms_conf) RESOLVEFUNC(SSLeay) @@ -134,7 +148,7 @@ delete libs.first; delete libs.second; qCWarning(lcSsl, "Incompatible version of OpenSSL"); -@@ -994,8 +1024,12 @@ bool q_resolveOpenSslSymbols() +@@ -1007,8 +1037,12 @@ bool q_resolveOpenSslSymbols() #ifndef OPENSSL_NO_EC #if OPENSSL_VERSION_NUMBER >= 0x10002000L @@ -148,3 +162,12 @@ #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L #endif // OPENSSL_NO_EC +@@ -1122,7 +1156,7 @@ bool q_resolveOpenSslSymbols() + RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey) + RESOLVEFUNC(SSL_CTX_use_PrivateKey_file) + RESOLVEFUNC(SSL_CTX_get_cert_store); +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + RESOLVEFUNC(SSL_CONF_CTX_new); + RESOLVEFUNC(SSL_CONF_CTX_free); + RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx); 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 Mon Nov 26 19:01:17 2018 (r485964) +++ head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h Mon Nov 26 20:29:01 2018 (r485965) @@ -1,7 +1,34 @@ Boilerplate for SSL_CTX_set1_groups() used in qsslcontext_openssl.cpp. ---- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig 2018-02-08 18:24:48 UTC +* +* Fix for libressl atter openssl111 API change +* Definitions for TLS_VERSIONS needed for qsslcontext_openssl11.cpp (QSslContext::initSslContext) +* +--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig 2018-10-21 17:04:11 UTC +++ src/network/ssl/qsslsocket_openssl_symbols_p.h -@@ -454,6 +454,9 @@ void q_EC_KEY_free(EC_KEY *ecdh); +@@ -74,6 +74,13 @@ + + QT_BEGIN_NAMESPACE + ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L ++# define TLS1_2_VERSION 0x0303 ++# define TLS_MAX_VERSION TLS1_2_VERSION ++# define TLS_ANY_VERSION 0x10000 ++#endif ++ ++ + #define DUMMYARG + + #if !defined QT_LINKED_OPENSSL +@@ -356,7 +363,7 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, + int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b); + int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c); + X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a); +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER) + SSL_CONF_CTX *q_SSL_CONF_CTX_new(); + void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a); + void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b); +@@ -468,6 +475,9 @@ 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);