public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2019-03-02  0:51 Stefan Strogin
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Strogin @ 2019-03-02  0:51 UTC (permalink / raw
  To: gentoo-commits

commit:     e7ebc1bc36959b7a842b5800b4459dd444c3b5d6
Author:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Sat Mar  2 00:50:42 2019 +0000
Commit:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
CommitDate: Sat Mar  2 00:50:42 2019 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=e7ebc1bc

dev-qt/qtnetwork: bump version to 5.12.1; add patch

Bug: https://bugs.gentoo.org/562050
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>

 dev-qt/qtnetwork/Manifest                          |  1 +
 .../files/qtnetwork-5.12.1-libressl.patch          | 93 ++++++++++++++++++++++
 dev-qt/qtnetwork/qtnetwork-5.12.1.ebuild           | 67 ++++++++++++++++
 3 files changed, 161 insertions(+)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 69f23c6..95f102a 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1 +1,2 @@
 DIST qtbase-everywhere-src-5.11.3.tar.xz 46997676 BLAKE2B a70089be5530dec0eedcd5ba990140b375261dea5c85ea7d1dbb5b0bd09ee23edbb4917851127686b5f3cac6969a284eb91ab075ebe53326e69e99e81b257da0 SHA512 93865e41c994211456a575b085c2e7491b7975a1c3b4deb48e9616b51104eb990c1fcfd53d5fb2146ba22457cb134e6254e9077ba73c8b4c4b4d1d525e66fb65
+DIST qtbase-everywhere-src-5.12.1.tar.xz 48239912 BLAKE2B 99a92c2134a20d5f52a1ae69e5d248f12e4668308f894ead17927a778558b4fcd598f5f5208527a77e20550d7eb77502253cae91ad19f61ff422a1ff52e84060 SHA512 51494d8947ae16ab7aee22aca156035718f5a700737547de59b4d61d3919c00f4de858111c8928a66c0385604623d847d231892d964d53924a8c97b6e2bedf25

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.12.1-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.12.1-libressl.patch
new file mode 100644
index 0000000..bd86269
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.12.1-libressl.patch
@@ -0,0 +1,93 @@
+diff --git a/src/network/configure.json b/src/network/configure.json
+index f3e18662aa..8990763756 100644
+--- a/src/network/configure.json
++++ b/src/network/configure.json
+@@ -165,7 +165,7 @@
+             "test": {
+                 "include": "openssl/opensslv.h",
+                 "tail": [
+-                    "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L",
++                    "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)",
+                     "#  error OpenSSL >= 1.1 is required",
+                     "#endif"
+                 ]
+diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
+index 35cca9f01a..03afdc5945 100644
+--- a/src/network/ssl/qsslcontext_openssl.cpp
++++ b/src/network/ssl/qsslcontext_openssl.cpp
+@@ -249,7 +249,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+     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<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+         if (cctx) {
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+index 299df6b685..670314d7e5 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
++++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+@@ -216,8 +216,13 @@ DEFINEFUNC3(void *, ASN1_dup, i2d_of_void *a, a, d2i_of_void *b, b, char *c, c,
+ #endif
+ DEFINEFUNC2(BIO *, BIO_new_file, const char *filename, filename, const char *mode, mode, return nullptr, return)
+ DEFINEFUNC(void, ERR_clear_error, DUMMYARG, DUMMYARG, return, DUMMYARG)
++#ifdef LIBRESSL_VERSION_NUMBER
++DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return nullptr, return)
++DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return)
++#else
+ DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return nullptr, return)
+ DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return)
++#endif
+ DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
+ DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
+@@ -443,7 +448,7 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
+ 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 nullptr, 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 nullptr, 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);
+@@ -1246,7 +1251,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);
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+index bfdfbf0efc..ad2bd4056b 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
++++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+@@ -359,7 +359,7 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
+ 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);
+diff --git a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
+index b7bac5d2a2..9a1a89b0e4 100644
+--- a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
++++ b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
+@@ -78,8 +78,13 @@
+ unsigned char * q_ASN1_STRING_data(ASN1_STRING *a);
+ BIO *q_BIO_new_file(const char *filename, const char *mode);
+ void q_ERR_clear_error();
++#ifdef LIBRESSL_VERSION_NUMBER
++Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
++Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
++#else
+ Q_AUTOTEST_EXPORT BIO *q_BIO_new(BIO_METHOD *a);
+ Q_AUTOTEST_EXPORT BIO_METHOD *q_BIO_s_mem();
++#endif
+ int q_CRYPTO_num_locks();
+ void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
+ void q_CRYPTO_set_id_callback(unsigned long (*a)());

diff --git a/dev-qt/qtnetwork/qtnetwork-5.12.1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.12.1.ebuild
new file mode 100644
index 0000000..1362f6b
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.12.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+fi
+
+IUSE="bindist connman libproxy libressl networkmanager sctp +ssl"
+
+DEPEND="
+	~dev-qt/qtcore-${PV}
+	sys-libs/zlib:=
+	connman? ( ~dev-qt/qtdbus-${PV} )
+	libproxy? ( net-libs/libproxy )
+	networkmanager? ( ~dev-qt/qtdbus-${PV} )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0=[bindist=] )
+		libressl? ( dev-libs/libressl:0= )
+	)
+"
+RDEPEND="${DEPEND}
+	connman? ( net-misc/connman )
+	networkmanager? ( net-misc/networkmanager )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-libressl.patch
+)
+
+QT5_TARGET_SUBDIRS=(
+	src/network
+	src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+	libproxy:libproxy:
+	ssl::SSL
+	ssl::OPENSSL
+	ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:network
+)
+
+pkg_setup() {
+	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+	local myconf=(
+		$(usex connman -dbus-linked '')
+		$(qt_use libproxy)
+		$(usex networkmanager -dbus-linked '')
+		$(qt_use sctp)
+		$(usex ssl -openssl-linked '')
+	)
+	qt5-build_src_configure
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2019-03-02  0:51 Stefan Strogin
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Strogin @ 2019-03-02  0:51 UTC (permalink / raw
  To: gentoo-commits

commit:     5009a5a50855437ab0a31018d45528202e44fb18
Author:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Sat Mar  2 00:48:09 2019 +0000
Commit:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
CommitDate: Sat Mar  2 00:48:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=5009a5a5

dev-qt/qtnetwork: drop old

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>

 dev-qt/qtnetwork/Manifest                          |  4 --
 .../files/qtnetwork-5.11.1-libressl.patch          | 73 ----------------------
 dev-qt/qtnetwork/qtnetwork-5.11.1.ebuild           | 64 -------------------
 3 files changed, 141 deletions(-)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index ec63019..69f23c6 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1,5 +1 @@
-AUX qtnetwork-5.11.1-libressl.patch 4529 BLAKE2B 854a753d276eee5d6731edd235ecafd3489a15daba838c35ca2e06b71f1c6f9dbc9c9eb160fd7720616423bd110187d91a47cf0ee06dc0cd7415d07b6526adb7 SHA512 818d144f8a5b091ea79df108d5f5ddbec517619dd2630d1e85a690d84a2b7f7183da5ff03abb53019c7484175c1e2614fd3a65f5ce6dd3071d122b05ed7a7825
-DIST qtbase-everywhere-src-5.11.1.tar.xz 46860400 BLAKE2B 3297ace6582eeac8aee3ce39e8cb2a144190fea8af83e7da7659148e54c55962c1aa4994384ad62b98d4406b41dd72c602d09b9f22f752052c3bfbdc9b09f83a SHA512 5f45405872e541565d811c1973ae95b0f19593f4495375306917b72e21146e14fe8f7db5fbd629476476807f89ef1679aa59737ca5efdd9cbe6b14d7aa371b81
 DIST qtbase-everywhere-src-5.11.3.tar.xz 46997676 BLAKE2B a70089be5530dec0eedcd5ba990140b375261dea5c85ea7d1dbb5b0bd09ee23edbb4917851127686b5f3cac6969a284eb91ab075ebe53326e69e99e81b257da0 SHA512 93865e41c994211456a575b085c2e7491b7975a1c3b4deb48e9616b51104eb990c1fcfd53d5fb2146ba22457cb134e6254e9077ba73c8b4c4b4d1d525e66fb65
-EBUILD qtnetwork-5.11.1.ebuild 1342 BLAKE2B 68cc09bc2d425c726ff826006e6488d2c8122ced9f947ca2f10b059bf072697868cf37f89db8305dacdcbb26699143f63780aa199d778ae4912f1dfded338b04 SHA512 676443edb5c6d94f8737d915ccc9474cac80c283525cedac80717f0b766152906600a41b3afa7c0a8ab61defc5bec7add8c364b430789ce3245362e9f19220e4
-MISC metadata.xml 876 BLAKE2B cd547dff93432d3d0c4baba6790166ab951035e3c7b9d66fb9717349626f7ac72ef38daf7c648de40bf73ad59f5f7ad8c85894d73e2c37b24832371bed868656 SHA512 6a38a068dd89a9a1bb470938bf4b2427553356fed8f1a638596e21261363544b8fb770ca2ec9e619aedb4e4ea260b60966924b5b8beb8295804c99cb8d916f5f

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.11.1-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.11.1-libressl.patch
deleted file mode 100644
index 9ed8355..0000000
--- a/dev-qt/qtnetwork/files/qtnetwork-5.11.1-libressl.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-diff -ur a/config.tests/unix/openssl11/openssl.cpp b/config.tests/unix/openssl11/openssl.cpp
---- a/config.tests/unix/openssl11/openssl.cpp	2018-06-15 09:29:31.000000000 +0200
-+++ b/config.tests/unix/openssl11/openssl.cpp	2018-11-07 19:00:26.251211691 +0100
-@@ -39,7 +39,7 @@
- 
- #include <openssl/opensslv.h>
- 
--#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L
-+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #  error "OpenSSL >= 1.1 is required"
- #endif
- 
-diff -ur a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
---- a/src/network/ssl/qsslcontext_openssl.cpp	2018-06-15 09:29:31.000000000 +0200
-+++ b/src/network/ssl/qsslcontext_openssl.cpp	2018-11-07 19:00:26.251211691 +0100
-@@ -248,7 +248,7 @@
-     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<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
-         if (cctx) {
-diff -ur a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
---- a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h	2018-06-15 09:29:31.000000000 +0200
-+++ b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h	2018-11-07 19:00:57.976885459 +0100
-@@ -78,8 +78,8 @@
- unsigned char * q_ASN1_STRING_data(ASN1_STRING *a);
- BIO *q_BIO_new_file(const char *filename, const char *mode);
- void q_ERR_clear_error();
--Q_AUTOTEST_EXPORT BIO *q_BIO_new(BIO_METHOD *a);
--Q_AUTOTEST_EXPORT BIO_METHOD *q_BIO_s_mem();
-+Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
-+Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
- int q_CRYPTO_num_locks();
- void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
- void q_CRYPTO_set_id_callback(unsigned long (*a)());
-diff -ur a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp	2018-06-15 09:29:31.000000000 +0200
-+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp	2018-11-07 19:00:57.975885469 +0100
-@@ -190,8 +190,8 @@
- #endif
- DEFINEFUNC2(BIO *, BIO_new_file, const char *filename, filename, const char *mode, mode, return 0, return)
- DEFINEFUNC(void, ERR_clear_error, DUMMYARG, DUMMYARG, return, DUMMYARG)
--DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
--DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
-+DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return 0, return)
-+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
- DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
- DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
- DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
-@@ -406,7 +406,7 @@
- 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);
-diff -ur a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
---- a/src/network/ssl/qsslsocket_openssl_symbols_p.h	2018-06-15 09:29:31.000000000 +0200
-+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h	2018-11-07 19:00:26.252211681 +0100
-@@ -356,7 +356,7 @@
- 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);

diff --git a/dev-qt/qtnetwork/qtnetwork-5.11.1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.11.1.ebuild
deleted file mode 100644
index bb7dfa7..0000000
--- a/dev-qt/qtnetwork/qtnetwork-5.11.1.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-QT5_MODULE="qtbase"
-inherit qt5-build
-
-DESCRIPTION="Network abstraction library for the Qt5 framework"
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
-	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd"
-fi
-
-IUSE="bindist connman libproxy libressl networkmanager +ssl"
-
-DEPEND="
-	~dev-qt/qtcore-${PV}
-	>=sys-libs/zlib-1.2.5
-	connman? ( ~dev-qt/qtdbus-${PV} )
-	libproxy? ( net-libs/libproxy )
-	networkmanager? ( ~dev-qt/qtdbus-${PV} )
-	ssl? (
-		!libressl? ( dev-libs/openssl:0/1.1[bindist=] )
-		libressl? ( dev-libs/libressl:0= )
-	)
-"
-RDEPEND="${DEPEND}
-	connman? ( net-misc/connman )
-	networkmanager? ( net-misc/networkmanager )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-libressl.patch
-)
-
-QT5_TARGET_SUBDIRS=(
-	src/network
-	src/plugins/bearer/generic
-)
-
-QT5_GENTOO_CONFIG=(
-	libproxy
-	ssl::SSL
-	ssl::OPENSSL
-	ssl:openssl-linked:LINKED_OPENSSL
-)
-
-QT5_GENTOO_PRIVATE_CONFIG=(
-	:network
-)
-
-pkg_setup() {
-	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
-	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
-}
-
-src_configure() {
-	local myconf=(
-		$(use connman || use networkmanager && echo -dbus-linked)
-		$(qt_use libproxy)
-		$(usex ssl -openssl-linked '')
-	)
-	qt5-build_src_configure
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2020-05-27  8:15 Stefan Strogin
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Strogin @ 2020-05-27  8:15 UTC (permalink / raw
  To: gentoo-commits

commit:     9e800fa134c8a71ffdbe546ec0dc9477a6f4c185
Author:     Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Wed May 27 08:14:40 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Wed May 27 08:14:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=9e800fa1

dev-qt/qtnetwork: version bump to 5.15.0

Bug: https://bugs.gentoo.org/562050
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 dev-qt/qtnetwork/Manifest                          |   1 +
 .../files/qtnetwork-5.15.0-libressl.patch          | 340 +++++++++++++++++++++
 dev-qt/qtnetwork/qtnetwork-5.15.0.ebuild           |  67 ++++
 3 files changed, 408 insertions(+)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 62cc41e..4905e98 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1,2 +1,3 @@
 DIST qtbase-everywhere-src-5.14.1.tar.xz 49828188 BLAKE2B d5641df96a90ec4f3f85e47444c151b2090161330df9684703883865ddc84bed507295b67953c0a8cad9c104a10727ac9fb26d7f3ec4bf2052294c843f108491 SHA512 964777323d0e3f9d355218c3493bb3b61d2750d9cb5ba71fce72cae3cd362acce88e39360f1fac0011f1b74d529a23621a7281191c622cc034ce78a77afa296b
 DIST qtbase-everywhere-src-5.14.2.tar.xz 49865752 BLAKE2B ed8eb18dfc79e9983248655eb62e8305ef8b79f96c7880c88533250fef8f0d187cf576082d41df08314711b4c007b94686486abd77bf9bc201336caa02ced300 SHA512 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9
+DIST qtbase-everywhere-src-5.15.0.tar.xz 49931940 BLAKE2B f6675ddb8c6fcfe4d12f92b0c93d09ec160e65bb214694550c82c1ba1acea41c86064910cf76267815bd860b071a322bbbad19e994be52f0bf1450a73d09a1bf SHA512 c584d69e49f4959d9b8541f820f5ff1e6d1599697ad16976b47cbaaa902fc83e1ca4ae57d56d13574e42e5f602d4420245ad7fcfc13e224e10d4bbad6a537d1a

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.0-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.0-libressl.patch
new file mode 100644
index 0000000..d0a4796
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.0-libressl.patch
@@ -0,0 +1,340 @@
+From 4774fcd31a49f6f193bf10990601ad494fab2013 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Wed, 5 Feb 2020 03:49:35 +0200
+Subject: [PATCH] QSslSocket - add LibreSSL support
+
+Upstream-Status: Inappropriate
+[Upstream is not willing to accept any patches for LibreSSL support]
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ src/network/ssl/qsslcertificate_openssl.cpp   |  2 +-
+ src/network/ssl/qsslcontext_openssl.cpp       | 17 +++++++-
+ src/network/ssl/qsslcontext_openssl_p.h       |  7 +++
+ src/network/ssl/qsslsocket_openssl.cpp        |  2 +-
+ .../ssl/qsslsocket_openssl_symbols.cpp        | 25 +++++++++++
+ .../ssl/qsslsocket_openssl_symbols_p.h        | 43 +++++++++++++++++++
+ 6 files changed, 93 insertions(+), 3 deletions(-)
+
+diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp
+index 6f1fb26a..eba5a729 100644
+--- a/src/network/ssl/qsslcertificate_openssl.cpp
++++ b/src/network/ssl/qsslcertificate_openssl.cpp
+@@ -658,7 +658,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
+         unsigned char *data = nullptr;
+         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
+         info.insert(name, QString::fromUtf8((char*)data, size));
+-#if QT_CONFIG(opensslv11)
++#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
+         q_CRYPTO_free(data, nullptr, 0);
+ #else
+         q_CRYPTO_free(data);
+diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
+index 0aa8a4f4..f161af8a 100644
+--- a/src/network/ssl/qsslcontext_openssl.cpp
++++ b/src/network/ssl/qsslcontext_openssl.cpp
+@@ -397,16 +397,28 @@ init_context:
+         maxVersion = DTLS1_VERSION;
+         break;
+     case QSsl::DtlsV1_0OrLater:
++#ifdef DTLS_MAX_VERSION
+         minVersion = DTLS1_VERSION;
+         maxVersion = DTLS_MAX_VERSION;
++#else
++        Q_UNREACHABLE();
++#endif // DTLS_MAX_VERSION
+         break;
+     case QSsl::DtlsV1_2:
++#ifdef DTLS1_2_VERSION
+         minVersion = DTLS1_2_VERSION;
+         maxVersion = DTLS1_2_VERSION;
++#else
++        Q_UNREACHABLE();
++#endif // DTLS1_2_VERSION
+         break;
+     case QSsl::DtlsV1_2OrLater:
++#if defined(DTLS1_2_VERSION) && defined(DTLS_MAX_VERSION)
+         minVersion = DTLS1_2_VERSION;
+         maxVersion = DTLS_MAX_VERSION;
++#else
++        Q_UNREACHABLE();
++#endif // DTLS1_2_VERSION && DTLS_MAX_VERSION
+         break;
+     case QSsl::TlsV1_3OrLater:
+ #ifdef TLS1_3_VERSION
+@@ -696,6 +708,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+     }
+ #endif // ocsp
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+     if (cctx) {
+         q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
+@@ -742,7 +755,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+             sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
+             sslContext->errorCode = QSslError::UnspecifiedError;
+         }
+-    } else {
++    } else
++#endif // LIBRESSL_VERSION_NUMBER
++    {
+         sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
+         sslContext->errorCode = QSslError::UnspecifiedError;
+     }
+diff --git a/src/network/ssl/qsslcontext_openssl_p.h b/src/network/ssl/qsslcontext_openssl_p.h
+index 70cb97aa..01a61cf5 100644
+--- a/src/network/ssl/qsslcontext_openssl_p.h
++++ b/src/network/ssl/qsslcontext_openssl_p.h
+@@ -61,6 +61,13 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
++#ifndef DTLS_ANY_VERSION
++#define DTLS_ANY_VERSION 0x1FFFF
++#endif
++#ifndef TLS_ANY_VERSION
++#define TLS_ANY_VERSION 0x10000
++#endif
++
+ #ifndef QT_NO_SSL
+ 
+ class QSslContextPrivate;
+diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
+index 4be27aff..1f33911e 100644
+--- a/src/network/ssl/qsslsocket_openssl.cpp
++++ b/src/network/ssl/qsslsocket_openssl.cpp
+@@ -598,7 +598,7 @@ bool QSslSocketBackendPrivate::initSslContext()
+     else if (mode == QSslSocket::SslServerMode)
+         q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x10101006L
++#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
+     // Set the client callback for TLSv1.3 PSK
+     if (mode == QSslSocket::SslClientMode
+         && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+index 71a268ae..8a43035b 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
++++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+@@ -147,6 +147,7 @@ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
+ DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
+ DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
+ DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
+ DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
+ DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+@@ -154,6 +155,14 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return null
+ DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
+ DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
++#else
++DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
++DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
++DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
++DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
++DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
++DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
+ DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
+ #ifdef TLS1_3_VERSION
+@@ -179,7 +188,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
+ DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
+ DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
+ DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
++#else
++DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
++#endif
+ DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
+ DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
+ DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
+@@ -219,7 +232,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
+             ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
+             return 0, return)
+ DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
++#endif
+ DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
+ DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
+             int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
+@@ -351,12 +366,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
+ 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 nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, 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);
+ DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
+ DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
+ DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
++#endif
+ DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
+ DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
+ DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
+@@ -833,12 +850,14 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(EVP_PKEY_up_ref)
+     RESOLVEFUNC(EVP_PKEY_base_id)
+     RESOLVEFUNC(RSA_bits)
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(OPENSSL_sk_new_null)
+     RESOLVEFUNC(OPENSSL_sk_push)
+     RESOLVEFUNC(OPENSSL_sk_free)
+     RESOLVEFUNC(OPENSSL_sk_num)
+     RESOLVEFUNC(OPENSSL_sk_pop_free)
+     RESOLVEFUNC(OPENSSL_sk_value)
++#endif
+     RESOLVEFUNC(DH_get0_pqg)
+     RESOLVEFUNC(SSL_CTX_set_options)
+ 
+@@ -880,7 +899,9 @@ bool q_resolveOpenSslSymbols()
+ 
+     RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
+     RESOLVEFUNC(DH_bits)
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(DSA_bits)
++#endif
+ 
+ #if QT_CONFIG(dtls)
+     RESOLVEFUNC(DTLSv1_listen)
+@@ -910,7 +931,9 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(OCSP_check_validity)
+     RESOLVEFUNC(OCSP_cert_to_id)
+     RESOLVEFUNC(OCSP_id_get0_info)
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(OCSP_resp_get0_certs)
++#endif
+     RESOLVEFUNC(OCSP_basic_sign)
+     RESOLVEFUNC(OCSP_response_create)
+     RESOLVEFUNC(i2d_OCSP_RESPONSE)
+@@ -1040,12 +1063,14 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
+     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+     RESOLVEFUNC(SSL_CTX_get_cert_store);
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(SSL_CONF_CTX_new);
+     RESOLVEFUNC(SSL_CONF_CTX_free);
+     RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
+     RESOLVEFUNC(SSL_CONF_CTX_set_flags);
+     RESOLVEFUNC(SSL_CONF_CTX_finish);
+     RESOLVEFUNC(SSL_CONF_cmd);
++#endif
+     RESOLVEFUNC(SSL_accept)
+     RESOLVEFUNC(SSL_clear)
+     RESOLVEFUNC(SSL_connect)
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+index f35e0ba2..30097317 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
++++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+@@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE
+ 
+ #define DUMMYARG
+ 
++#ifdef LIBRESSL_VERSION_NUMBER
++typedef _STACK STACK;
++typedef STACK OPENSSL_STACK;
++typedef void OPENSSL_INIT_SETTINGS;
++typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
++#endif
++
+ #if !defined QT_LINKED_OPENSSL
+ // **************** Shared declarations ******************
+ // ret func(arg)
+@@ -230,17 +237,38 @@ const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
+ Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
+ Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ int q_DSA_bits(DSA *a);
++#else
++#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
++#endif
+ int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
+ Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
+ int q_EVP_PKEY_base_id(EVP_PKEY *a);
+ int q_RSA_bits(RSA *a);
++
++#ifndef LIBRESSL_VERSION_NUMBER
+ Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
+ Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
+ Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
++#else // LIBRESSL_VERSION_NUMBER
++int q_sk_num(STACK *a);
++#define q_OPENSSL_sk_num(a) q_sk_num(a)
++void q_sk_pop_free(STACK *a, void (*b)(void *));
++#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
++STACK *q_sk_new_null();
++#define q_OPENSSL_sk_new_null() q_sk_new_null()
++void q_sk_push(STACK *st, void *data);
++#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
++void q_sk_free(STACK *a);
++#define q_OPENSSL_sk_free q_sk_free
++void *q_sk_value(STACK *a, int b);
++#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
++#endif // LIBRESSL_VERSION_NUMBER
++
+ int q_SSL_session_reused(SSL *a);
+ unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
+ int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+@@ -266,8 +294,13 @@ int q_DH_bits(DH *dh);
+ # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
+                                                        | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
+ #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
++#else
++#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
++#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+ #define q_OPENSSL_add_all_algorithms_conf()  q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
+                                                                    | OPENSSL_INIT_ADD_ALL_DIGESTS \
+@@ -276,7 +309,11 @@ int q_DH_bits(DH *dh);
+                                                                     | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
+ 
+ int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
++#ifndef LIBRESSL_VERSION_NUMBER
+ void q_CRYPTO_free(void *str, const char *file, int line);
++#else
++void q_CRYPTO_free(void *a);
++#endif
+ 
+ long q_OpenSSL_version_num();
+ const char *q_OpenSSL_version(int type);
+@@ -494,12 +531,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
+ 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);
++#ifndef 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);
+ unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
+ int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
+ int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
++#endif
+ void q_SSL_free(SSL *a);
+ STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
+ const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
+@@ -715,7 +754,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
+ int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
+                         ASN1_INTEGER **pserial, OCSP_CERTID *cid);
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
++#else
++#define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
++#endif
+ Q_AUTOTEST_EXPORT OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
+ Q_AUTOTEST_EXPORT void q_OCSP_CERTID_free(OCSP_CERTID *cid);
+ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+-- 
+2.25.0
+

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.0.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.0.ebuild
new file mode 100644
index 0000000..c203b98
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+IUSE="bindist connman gssapi libproxy libressl networkmanager sctp +ssl"
+
+DEPEND="
+	~dev-qt/qtcore-${PV}:5=
+	sys-libs/zlib:=
+	connman? ( ~dev-qt/qtdbus-${PV} )
+	gssapi? ( virtual/krb5 )
+	libproxy? ( net-libs/libproxy )
+	networkmanager? ( ~dev-qt/qtdbus-${PV} )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0=[bindist=] )
+		libressl? ( dev-libs/libressl:0= )
+	)
+"
+RDEPEND="${DEPEND}
+	connman? ( net-misc/connman )
+	networkmanager? ( net-misc/networkmanager )
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-5.15.0-libressl.patch )
+
+QT5_TARGET_SUBDIRS=(
+	src/network
+	src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+	libproxy:libproxy:
+	ssl::SSL
+	ssl::OPENSSL
+	ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:network
+)
+
+pkg_setup() {
+	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+	local myconf=(
+		$(usex connman -dbus-linked '')
+		$(usex gssapi -feature-gssapi -no-feature-gssapi)
+		$(qt_use libproxy)
+		$(usex networkmanager -dbus-linked '')
+		$(qt_use sctp)
+		$(usex ssl -openssl-linked '')
+	)
+	qt5-build_src_configure
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2020-11-28 19:18 Stefan Strogin
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Strogin @ 2020-11-28 19:18 UTC (permalink / raw
  To: gentoo-commits

commit:     423d689e2c7c85b606582909e5acf6d139341702
Author:     Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 19:17:13 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 19:18:11 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=423d689e

dev-qt/qtnetwork: drop old 5.14.2

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 dev-qt/qtnetwork/Manifest                          |   1 -
 .../files/qtnetwork-5.12.1-libressl.patch          |  93 -----------
 .../files/qtnetwork-5.12.4-libressl.patch          |  14 --
 .../files/qtnetwork-5.14.2-CVE-2020-13962.patch    | 172 ---------------------
 dev-qt/qtnetwork/qtnetwork-5.14.2-r1.ebuild        |  71 ---------
 5 files changed, 351 deletions(-)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index f458c94..7dbec38 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1,2 +1 @@
-DIST qtbase-everywhere-src-5.14.2.tar.xz 49865752 BLAKE2B ed8eb18dfc79e9983248655eb62e8305ef8b79f96c7880c88533250fef8f0d187cf576082d41df08314711b4c007b94686486abd77bf9bc201336caa02ced300 SHA512 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9
 DIST qtbase-everywhere-src-5.15.0.tar.xz 49931940 BLAKE2B f6675ddb8c6fcfe4d12f92b0c93d09ec160e65bb214694550c82c1ba1acea41c86064910cf76267815bd860b071a322bbbad19e994be52f0bf1450a73d09a1bf SHA512 c584d69e49f4959d9b8541f820f5ff1e6d1599697ad16976b47cbaaa902fc83e1ca4ae57d56d13574e42e5f602d4420245ad7fcfc13e224e10d4bbad6a537d1a

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.12.1-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.12.1-libressl.patch
deleted file mode 100644
index bd86269..0000000
--- a/dev-qt/qtnetwork/files/qtnetwork-5.12.1-libressl.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/src/network/configure.json b/src/network/configure.json
-index f3e18662aa..8990763756 100644
---- a/src/network/configure.json
-+++ b/src/network/configure.json
-@@ -165,7 +165,7 @@
-             "test": {
-                 "include": "openssl/opensslv.h",
-                 "tail": [
--                    "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L",
-+                    "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)",
-                     "#  error OpenSSL >= 1.1 is required",
-                     "#endif"
-                 ]
-diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
-index 35cca9f01a..03afdc5945 100644
---- a/src/network/ssl/qsslcontext_openssl.cpp
-+++ b/src/network/ssl/qsslcontext_openssl.cpp
-@@ -249,7 +249,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
-     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<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
-         if (cctx) {
-diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-index 299df6b685..670314d7e5 100644
---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
-+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-@@ -216,8 +216,13 @@ DEFINEFUNC3(void *, ASN1_dup, i2d_of_void *a, a, d2i_of_void *b, b, char *c, c,
- #endif
- DEFINEFUNC2(BIO *, BIO_new_file, const char *filename, filename, const char *mode, mode, return nullptr, return)
- DEFINEFUNC(void, ERR_clear_error, DUMMYARG, DUMMYARG, return, DUMMYARG)
-+#ifdef LIBRESSL_VERSION_NUMBER
-+DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return nullptr, return)
-+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return)
-+#else
- DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return nullptr, return)
- DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return)
-+#endif
- DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
- DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
- DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
-@@ -443,7 +448,7 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
- 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 nullptr, 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 nullptr, 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);
-@@ -1246,7 +1251,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);
-diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
-index bfdfbf0efc..ad2bd4056b 100644
---- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
-+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
-@@ -359,7 +359,7 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
- 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);
-diff --git a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
-index b7bac5d2a2..9a1a89b0e4 100644
---- a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
-+++ b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
-@@ -78,8 +78,13 @@
- unsigned char * q_ASN1_STRING_data(ASN1_STRING *a);
- BIO *q_BIO_new_file(const char *filename, const char *mode);
- void q_ERR_clear_error();
-+#ifdef LIBRESSL_VERSION_NUMBER
-+Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
-+Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
-+#else
- Q_AUTOTEST_EXPORT BIO *q_BIO_new(BIO_METHOD *a);
- Q_AUTOTEST_EXPORT BIO_METHOD *q_BIO_s_mem();
-+#endif
- int q_CRYPTO_num_locks();
- void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
- void q_CRYPTO_set_id_callback(unsigned long (*a)());

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.12.4-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.12.4-libressl.patch
deleted file mode 100644
index b200efa..0000000
--- a/dev-qt/qtnetwork/files/qtnetwork-5.12.4-libressl.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
-index c8bc6e06..76324ea5 100644
---- a/src/network/ssl/qsslsocket_openssl.cpp
-+++ b/src/network/ssl/qsslsocket_openssl.cpp
-@@ -460,7 +460,7 @@ bool QSslSocketBackendPrivate::initSslContext()
-             q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
-     }
- #endif
--#if OPENSSL_VERSION_NUMBER >= 0x10101006L
-+#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
-     // Set the client callback for TLSv1.3 PSK
-     if (mode == QSslSocket::SslClientMode
-         && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
-

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.14.2-CVE-2020-13962.patch b/dev-qt/qtnetwork/files/qtnetwork-5.14.2-CVE-2020-13962.patch
deleted file mode 100644
index 9bbdda6..0000000
--- a/dev-qt/qtnetwork/files/qtnetwork-5.14.2-CVE-2020-13962.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 8ddffc6ba4f38bb8dbeb0cf61b6b10ee73505bbb Mon Sep 17 00:00:00 2001
-From: Timur Pocheptsov <timur.pocheptsov@qt.io>
-Date: Mon, 13 Apr 2020 20:31:34 +0200
-Subject: [PATCH] OpenSSL: handle SSL_shutdown's errors properly
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-Do not call SSL_shutdown on a session that is in handshake state (SSL_in_init(s)
-returns 1). Also, do not call SSL_shutdown if a session encountered a fatal
-error (SSL_ERROR_SYSCALL or SSL_ERROR_SSL was found before). If SSL_shutdown
-was unsuccessful (returned code != 1), we have to clear the error(s) it queued.
-Unfortunately, SSL_in_init was a macro in OpenSSL 1.0.x. We have to
-resolve SSL_state to implement SSL_in_init.
-
-Fixes: QTBUG-83450
-Change-Id: I6326119f4e79605429263045ac20605c30dccca3
-Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-(cherry picked from commit 8907635da59c2ae0e8db01f27b24a841b830e655)
----
- src/network/ssl/qsslsocket.cpp                     |  2 +-
- src/network/ssl/qsslsocket_openssl.cpp             | 23 ++++++++++++++++------
- src/network/ssl/qsslsocket_openssl11_symbols_p.h   |  7 +++++++
- src/network/ssl/qsslsocket_openssl_symbols.cpp     |  8 ++++++++
- .../ssl/qsslsocket_opensslpre11_symbols_p.h        |  2 ++
- src/network/ssl/qsslsocket_p.h                     |  1 +
- 6 files changed, 36 insertions(+), 7 deletions(-)
-
-diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
-index 4e9e9472631..5c9e589ec39 100644
---- a/src/network/ssl/qsslsocket.cpp
-+++ b/src/network/ssl/qsslsocket.cpp
-@@ -2166,7 +2166,7 @@ void QSslSocketPrivate::init()
-     pendingClose = false;
-     flushTriggered = false;
-     ocspResponses.clear();
--
-+    systemOrSslErrorDetected = false;
-     // we don't want to clear the ignoreErrorsList, so
-     // that it is possible setting it before connecting
- //    ignoreErrorsList.clear();
-diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
-index 51510f1c60b..855865209bc 100644
---- a/src/network/ssl/qsslsocket_openssl.cpp
-+++ b/src/network/ssl/qsslsocket_openssl.cpp
-@@ -648,10 +648,16 @@ bool QSslSocketBackendPrivate::initSslContext()
- void QSslSocketBackendPrivate::destroySslContext()
- {
-     if (ssl) {
--        // We do not send a shutdown alert here. Just mark the session as
--        // resumable for qhttpnetworkconnection's "optimization", otherwise
--        // OpenSSL won't start a session resumption.
--        q_SSL_shutdown(ssl);
-+        if (!q_SSL_in_init(ssl) && !systemOrSslErrorDetected) {
-+            // We do not send a shutdown alert here. Just mark the session as
-+            // resumable for qhttpnetworkconnection's "optimization", otherwise
-+            // OpenSSL won't start a session resumption.
-+            if (q_SSL_shutdown(ssl) != 1) {
-+                // Some error may be queued, clear it.
-+                const auto errors = getErrorsFromOpenSsl();
-+                Q_UNUSED(errors);
-+            }
-+        }
-         q_SSL_free(ssl);
-         ssl = nullptr;
-     }
-@@ -1084,6 +1090,7 @@ void QSslSocketBackendPrivate::transmit()
-             case SSL_ERROR_SSL: // error in the SSL library
-                 // we do not know exactly what the error is, nor whether we can recover from it,
-                 // so just return to prevent an endless loop in the outer "while" statement
-+                systemOrSslErrorDetected = true;
-                 {
-                     const ScopedBool bg(inSetAndEmitError, true);
-                     setErrorAndEmit(QAbstractSocket::SslInternalError,
-@@ -1681,8 +1688,12 @@ bool QSslSocketBackendPrivate::checkOcspStatus()
- void QSslSocketBackendPrivate::disconnectFromHost()
- {
-     if (ssl) {
--        if (!shutdown) {
--            q_SSL_shutdown(ssl);
-+        if (!shutdown && !q_SSL_in_init(ssl) && !systemOrSslErrorDetected) {
-+            if (q_SSL_shutdown(ssl) != 1) {
-+                // Some error may be queued, clear it.
-+                const auto errors = getErrorsFromOpenSsl();
-+                Q_UNUSED(errors);
-+            }
-             shutdown = true;
-             transmit();
-         }
-diff --git a/src/network/ssl/qsslsocket_openssl11_symbols_p.h b/src/network/ssl/qsslsocket_openssl11_symbols_p.h
-index 0fe0899d4fd..b7193ad1807 100644
---- a/src/network/ssl/qsslsocket_openssl11_symbols_p.h
-+++ b/src/network/ssl/qsslsocket_openssl11_symbols_p.h
-@@ -192,4 +192,11 @@ typedef int (*q_SSL_psk_use_session_cb_func_t)(SSL *, const EVP_MD *, const unsi
- }
- void q_SSL_set_psk_use_session_callback(SSL *s, q_SSL_psk_use_session_cb_func_t);
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10101000L
-+// What a mess!
-+int q_SSL_in_init(SSL *s);
-+#else
-+int q_SSL_in_init(const SSL *s);
-+#endif // 1.1.1 or 1.1.0
-+
- #endif
-diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-index 85029a6ff3f..d1bd84cf25f 100644
---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
-+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-@@ -160,6 +160,11 @@ DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
- DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
- DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
- DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
-+#if OPENSSL_VERSION_NUMBER < 0x10101000L
-+DEFINEFUNC(int, SSL_in_init, SSL *a, a, return 0, return)
-+#else
-+DEFINEFUNC(int, SSL_in_init, const SSL *a, a, return 0, return)
-+#endif
- #ifdef TLS1_3_VERSION
- DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
- DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
-@@ -242,6 +247,7 @@ DEFINEFUNC2(void, BIO_set_shutdown, BIO *a, a, int shut, shut, return, DUMMYARG)
- // Functions below are either deprecated or removed in OpenSSL >= 1.1:
- 
- DEFINEFUNC(unsigned char *, ASN1_STRING_data, ASN1_STRING *a, a, return nullptr, return)
-+DEFINEFUNC(int, SSL_state, const SSL *a, a, return 0, return)
- 
- #ifdef SSLEAY_MACROS
- DEFINEFUNC3(void *, ASN1_dup, i2d_of_void *a, a, d2i_of_void *b, b, char *c, c, return nullptr, return)
-@@ -971,6 +977,7 @@ bool q_resolveOpenSslSymbols()
- #if QT_CONFIG(opensslv11)
- 
-     RESOLVEFUNC(OPENSSL_init_ssl)
-+    RESOLVEFUNC(SSL_in_init)
-     RESOLVEFUNC(OPENSSL_init_crypto)
-     RESOLVEFUNC(ASN1_STRING_get0_data)
-     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
-@@ -1066,6 +1073,7 @@ bool q_resolveOpenSslSymbols()
- #else // !opensslv11
- 
-     RESOLVEFUNC(ASN1_STRING_data)
-+    RESOLVEFUNC(SSL_state)
- 
- #ifdef SSLEAY_MACROS
-     RESOLVEFUNC(ASN1_dup)
-diff --git a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
-index f5626d5d164..92841017793 100644
---- a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
-+++ b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
-@@ -121,6 +121,8 @@ SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a);
- 
- int q_SSL_library_init();
- void q_SSL_load_error_strings();
-+int q_SSL_state(const SSL *a);
-+#define q_SSL_in_init(a) (q_SSL_state(a) & SSL_ST_INIT)
- 
- #if OPENSSL_VERSION_NUMBER >= 0x10001000L
- int q_SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
-index daa9be23f4a..350b1f1fc18 100644
---- a/src/network/ssl/qsslsocket_p.h
-+++ b/src/network/ssl/qsslsocket_p.h
-@@ -208,6 +208,7 @@ protected:
-     bool verifyErrorsHaveBeenIgnored();
-     bool paused;
-     bool flushTriggered;
-+    bool systemOrSslErrorDetected = false;
-     QVector<QOcspResponse> ocspResponses;
- };
- 
--- 
-2.16.3

diff --git a/dev-qt/qtnetwork/qtnetwork-5.14.2-r1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.14.2-r1.ebuild
deleted file mode 100644
index fec0386..0000000
--- a/dev-qt/qtnetwork/qtnetwork-5.14.2-r1.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-QT5_MODULE="qtbase"
-inherit qt5-build
-
-DESCRIPTION="Network abstraction library for the Qt5 framework"
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~sparc x86"
-fi
-
-IUSE="bindist connman gssapi libproxy libressl networkmanager sctp +ssl"
-
-DEPEND="
-	~dev-qt/qtcore-${PV}:5=
-	sys-libs/zlib:=
-	connman? ( ~dev-qt/qtdbus-${PV} )
-	gssapi? ( virtual/krb5 )
-	libproxy? ( net-libs/libproxy )
-	networkmanager? ( ~dev-qt/qtdbus-${PV} )
-	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
-	ssl? (
-		!libressl? ( dev-libs/openssl:0=[bindist=] )
-		libressl? ( dev-libs/libressl:0= )
-	)
-"
-RDEPEND="${DEPEND}
-	connman? ( net-misc/connman )
-	networkmanager? ( net-misc/networkmanager )
-"
-
-PATCHES=(
-	"${FILESDIR}/${P}-CVE-2020-13962.patch" # bug 727604, QTBUG-83450
-	"${FILESDIR}"/${PN}-5.12.1-libressl.patch
-	"${FILESDIR}"/${PN}-5.12.4-libressl.patch
-)
-
-QT5_TARGET_SUBDIRS=(
-	src/network
-	src/plugins/bearer/generic
-)
-
-QT5_GENTOO_CONFIG=(
-	libproxy:libproxy:
-	ssl::SSL
-	ssl::OPENSSL
-	ssl:openssl-linked:LINKED_OPENSSL
-)
-
-QT5_GENTOO_PRIVATE_CONFIG=(
-	:network
-)
-
-pkg_setup() {
-	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
-	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
-}
-
-src_configure() {
-	local myconf=(
-		$(usex connman -dbus-linked '')
-		$(usex gssapi -feature-gssapi -no-feature-gssapi)
-		$(qt_use libproxy)
-		$(usex networkmanager -dbus-linked '')
-		$(qt_use sctp)
-		$(usex ssl -openssl-linked '')
-	)
-	qt5-build_src_configure
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2020-11-28 19:22 Stefan Strogin
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Strogin @ 2020-11-28 19:22 UTC (permalink / raw
  To: gentoo-commits

commit:     92e51fd0194a46b1b4085df171916d79f19abc8c
Author:     Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 19:22:28 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 19:22:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=92e51fd0

dev-qt/qtnetwork: upgrade to 5.15.2

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 dev-qt/qtnetwork/Manifest                          |   2 +-
 ...ressl.patch => qtnetwork-5.15.2-libressl.patch} | 103 ++++++++++++++-------
 ...twork-5.15.0.ebuild => qtnetwork-5.15.2.ebuild} |  18 +++-
 3 files changed, 85 insertions(+), 38 deletions(-)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 7dbec38..8d47df5 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1 +1 @@
-DIST qtbase-everywhere-src-5.15.0.tar.xz 49931940 BLAKE2B f6675ddb8c6fcfe4d12f92b0c93d09ec160e65bb214694550c82c1ba1acea41c86064910cf76267815bd860b071a322bbbad19e994be52f0bf1450a73d09a1bf SHA512 c584d69e49f4959d9b8541f820f5ff1e6d1599697ad16976b47cbaaa902fc83e1ca4ae57d56d13574e42e5f602d4420245ad7fcfc13e224e10d4bbad6a537d1a
+DIST qtbase-everywhere-src-5.15.2.tar.xz 50179672 BLAKE2B 0e4bdaab43cf59664bde89f87ea260c39acc2ef866d8629d41d9c326cab0ab68bcd943c86a472ae74bc9fb0b7ad50795ccb66275bb6b77d1fcf0a38b5662cb42 SHA512 a549bfaf867d746ff744ab224eb65ac1bdcdac7e8457dfa379941b2b225a90442fcfc1e1175b9afb1f169468f8130b7ab917c67be67156520a4bfb5c92d304f9

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.0-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-libressl.patch
similarity index 79%
rename from dev-qt/qtnetwork/files/qtnetwork-5.15.0-libressl.patch
rename to dev-qt/qtnetwork/files/qtnetwork-5.15.2-libressl.patch
index d0a4796..f7fe32f 100644
--- a/dev-qt/qtnetwork/files/qtnetwork-5.15.0-libressl.patch
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-libressl.patch
@@ -1,25 +1,25 @@
-From 4774fcd31a49f6f193bf10990601ad494fab2013 Mon Sep 17 00:00:00 2001
+From 07a00f9c6d87f1fa5360cfb8f086670f3fa5bd3f Mon Sep 17 00:00:00 2001
 From: Stefan Strogin <steils@gentoo.org>
-Date: Wed, 5 Feb 2020 03:49:35 +0200
-Subject: [PATCH] QSslSocket - add LibreSSL support
+Date: Sat, 28 Nov 2020 06:12:22 +0200
+Subject: [PATCH] QSslSocket: add LibreSSL support
 
 Upstream-Status: Inappropriate
 [Upstream is not willing to accept any patches for LibreSSL support]
 Signed-off-by: Stefan Strogin <steils@gentoo.org>
 ---
  src/network/ssl/qsslcertificate_openssl.cpp   |  2 +-
- src/network/ssl/qsslcontext_openssl.cpp       | 17 +++++++-
+ src/network/ssl/qsslcontext_openssl.cpp       | 19 +++++++-
  src/network/ssl/qsslcontext_openssl_p.h       |  7 +++
  src/network/ssl/qsslsocket_openssl.cpp        |  2 +-
- .../ssl/qsslsocket_openssl_symbols.cpp        | 25 +++++++++++
- .../ssl/qsslsocket_openssl_symbols_p.h        | 43 +++++++++++++++++++
- 6 files changed, 93 insertions(+), 3 deletions(-)
+ .../ssl/qsslsocket_openssl_symbols.cpp        | 31 +++++++++++++
+ .../ssl/qsslsocket_openssl_symbols_p.h        | 45 +++++++++++++++++++
+ 6 files changed, 103 insertions(+), 3 deletions(-)
 
 diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp
-index 6f1fb26a..eba5a729 100644
+index ca9d61cc..19774432 100644
 --- a/src/network/ssl/qsslcertificate_openssl.cpp
 +++ b/src/network/ssl/qsslcertificate_openssl.cpp
-@@ -658,7 +658,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
+@@ -661,7 +661,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
          unsigned char *data = nullptr;
          int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
          info.insert(name, QString::fromUtf8((char*)data, size));
@@ -29,10 +29,22 @@ index 6f1fb26a..eba5a729 100644
  #else
          q_CRYPTO_free(data);
 diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
-index 0aa8a4f4..f161af8a 100644
+index c9f202f5..d3626cab 100644
 --- a/src/network/ssl/qsslcontext_openssl.cpp
 +++ b/src/network/ssl/qsslcontext_openssl.cpp
-@@ -397,16 +397,28 @@ init_context:
+@@ -351,9 +351,11 @@ init_context:
+         return;
+     }
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     // A nasty hacked OpenSSL using a level that will make our auto-tests fail:
+     if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
+         q_SSL_CTX_set_security_level(sslContext->ctx, 1);
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+     const long anyVersion =
+ #if QT_CONFIG(dtls)
+@@ -408,16 +410,28 @@ init_context:
          maxVersion = DTLS1_VERSION;
          break;
      case QSsl::DtlsV1_0OrLater:
@@ -61,7 +73,7 @@ index 0aa8a4f4..f161af8a 100644
          break;
      case QSsl::TlsV1_3OrLater:
  #ifdef TLS1_3_VERSION
-@@ -696,6 +708,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+@@ -722,6 +736,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
      }
  #endif // ocsp
  
@@ -69,7 +81,7 @@ index 0aa8a4f4..f161af8a 100644
      QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
      if (cctx) {
          q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
-@@ -742,7 +755,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+@@ -768,7 +783,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
              sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
              sslContext->errorCode = QSslError::UnspecifiedError;
          }
@@ -99,10 +111,10 @@ index 70cb97aa..01a61cf5 100644
  
  class QSslContextPrivate;
 diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
-index 4be27aff..1f33911e 100644
+index 277037e5..f599498d 100644
 --- a/src/network/ssl/qsslsocket_openssl.cpp
 +++ b/src/network/ssl/qsslsocket_openssl.cpp
-@@ -598,7 +598,7 @@ bool QSslSocketBackendPrivate::initSslContext()
+@@ -653,7 +653,7 @@ bool QSslSocketBackendPrivate::initSslContext()
      else if (mode == QSslSocket::SslServerMode)
          q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
  
@@ -112,18 +124,25 @@ index 4be27aff..1f33911e 100644
      if (mode == QSslSocket::SslClientMode
          && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
 diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-index 71a268ae..8a43035b 100644
+index ed80fc14..6941b4db 100644
 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
 +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-@@ -147,6 +147,7 @@ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
+@@ -145,11 +145,14 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return
+ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
+ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
  DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+ DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
+ DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
+ DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
++#endif // OPENSSL_NO_DEPRECATED_3_0
  DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
  DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
 +#ifndef LIBRESSL_VERSION_NUMBER
  DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
  DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
  DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-@@ -154,6 +155,14 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return null
+@@ -157,10 +160,20 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return null
  DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
  DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
  DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
@@ -137,8 +156,14 @@ index 71a268ae..8a43035b 100644
 +#endif // LIBRESSL_VERSION_NUMBER
  DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
  DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
+ DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
++#endif // LIBRESSL_VERSION_NUMBER
  #ifdef TLS1_3_VERSION
-@@ -179,7 +188,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
+ DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
+ DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
+@@ -184,7 +197,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
  DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
  DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
  DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
@@ -150,7 +175,7 @@ index 71a268ae..8a43035b 100644
  DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
  DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
  DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
-@@ -219,7 +232,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
+@@ -224,7 +241,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
              ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
              return 0, return)
  DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
@@ -160,7 +185,7 @@ index 71a268ae..8a43035b 100644
  DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
  DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
              int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
-@@ -351,12 +366,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
+@@ -356,12 +375,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
  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 nullptr, return)
@@ -175,8 +200,15 @@ index 71a268ae..8a43035b 100644
  DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
  DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
  DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
-@@ -833,12 +850,14 @@ bool q_resolveOpenSslSymbols()
+@@ -845,17 +866,21 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(ASN1_STRING_get0_data)
+     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
      RESOLVEFUNC(EVP_PKEY_up_ref)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+     RESOLVEFUNC(EVP_PKEY_CTX_new)
+     RESOLVEFUNC(EVP_PKEY_param_check)
+     RESOLVEFUNC(EVP_PKEY_CTX_free)
++#endif // OPENSSL_NO_DEPRECATED_3_0
      RESOLVEFUNC(EVP_PKEY_base_id)
      RESOLVEFUNC(RSA_bits)
 +#ifndef LIBRESSL_VERSION_NUMBER
@@ -189,8 +221,8 @@ index 71a268ae..8a43035b 100644
 +#endif
      RESOLVEFUNC(DH_get0_pqg)
      RESOLVEFUNC(SSL_CTX_set_options)
- 
-@@ -880,7 +899,9 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(SSL_CTX_get_security_level)
+@@ -898,7 +923,9 @@ bool q_resolveOpenSslSymbols()
  
      RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
      RESOLVEFUNC(DH_bits)
@@ -200,7 +232,7 @@ index 71a268ae..8a43035b 100644
  
  #if QT_CONFIG(dtls)
      RESOLVEFUNC(DTLSv1_listen)
-@@ -910,7 +931,9 @@ bool q_resolveOpenSslSymbols()
+@@ -928,7 +955,9 @@ bool q_resolveOpenSslSymbols()
      RESOLVEFUNC(OCSP_check_validity)
      RESOLVEFUNC(OCSP_cert_to_id)
      RESOLVEFUNC(OCSP_id_get0_info)
@@ -210,7 +242,7 @@ index 71a268ae..8a43035b 100644
      RESOLVEFUNC(OCSP_basic_sign)
      RESOLVEFUNC(OCSP_response_create)
      RESOLVEFUNC(i2d_OCSP_RESPONSE)
-@@ -1040,12 +1063,14 @@ bool q_resolveOpenSslSymbols()
+@@ -1058,12 +1087,14 @@ bool q_resolveOpenSslSymbols()
      RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
      RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
      RESOLVEFUNC(SSL_CTX_get_cert_store);
@@ -226,7 +258,7 @@ index 71a268ae..8a43035b 100644
      RESOLVEFUNC(SSL_clear)
      RESOLVEFUNC(SSL_connect)
 diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
-index f35e0ba2..30097317 100644
+index c46afcf5..42a31119 100644
 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
 +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
 @@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE
@@ -243,7 +275,7 @@ index f35e0ba2..30097317 100644
  #if !defined QT_LINKED_OPENSSL
  // **************** Shared declarations ******************
  // ret func(arg)
-@@ -230,17 +237,38 @@ const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
+@@ -230,20 +237,43 @@ const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
  Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
  Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
  
@@ -254,6 +286,11 @@ index f35e0ba2..30097317 100644
 +#endif
  int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
  Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+ EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
+ void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
+ int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
++#endif // OPENSSL_NO_DEPRECATED_3_0
  int q_EVP_PKEY_base_id(EVP_PKEY *a);
  int q_RSA_bits(RSA *a);
 +
@@ -282,7 +319,7 @@ index f35e0ba2..30097317 100644
  int q_SSL_session_reused(SSL *a);
  unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
  int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-@@ -266,8 +294,13 @@ int q_DH_bits(DH *dh);
+@@ -269,8 +299,13 @@ int q_DH_bits(DH *dh);
  # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
                                                         | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
  
@@ -296,7 +333,7 @@ index f35e0ba2..30097317 100644
  
  #define q_OPENSSL_add_all_algorithms_conf()  q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
                                                                     | OPENSSL_INIT_ADD_ALL_DIGESTS \
-@@ -276,7 +309,11 @@ int q_DH_bits(DH *dh);
+@@ -279,7 +314,11 @@ int q_DH_bits(DH *dh);
                                                                      | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
  
  int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
@@ -308,7 +345,7 @@ index f35e0ba2..30097317 100644
  
  long q_OpenSSL_version_num();
  const char *q_OpenSSL_version(int type);
-@@ -494,12 +531,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
+@@ -497,12 +536,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
  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);
@@ -323,7 +360,7 @@ index f35e0ba2..30097317 100644
  void q_SSL_free(SSL *a);
  STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
  const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
-@@ -715,7 +754,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
+@@ -728,7 +769,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
  int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
                          ASN1_INTEGER **pserial, OCSP_CERTID *cid);
  
@@ -336,5 +373,5 @@ index f35e0ba2..30097317 100644
  Q_AUTOTEST_EXPORT void q_OCSP_CERTID_free(OCSP_CERTID *cid);
  int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
 -- 
-2.25.0
+2.29.2
 

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.0.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.2.ebuild
similarity index 77%
rename from dev-qt/qtnetwork/qtnetwork-5.15.0.ebuild
rename to dev-qt/qtnetwork/qtnetwork-5.15.2.ebuild
index c203b98..01f1825 100644
--- a/dev-qt/qtnetwork/qtnetwork-5.15.0.ebuild
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.2.ebuild
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
+
 QT5_MODULE="qtbase"
 inherit qt5-build
 
@@ -11,7 +12,7 @@ if [[ ${QT5_BUILD_TYPE} == release ]]; then
 	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
 fi
 
-IUSE="bindist connman gssapi libproxy libressl networkmanager sctp +ssl"
+IUSE="bindist connman gssapi libressl libproxy networkmanager sctp +ssl"
 
 DEPEND="
 	~dev-qt/qtcore-${PV}:5=
@@ -22,7 +23,7 @@ DEPEND="
 	networkmanager? ( ~dev-qt/qtdbus-${PV} )
 	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
 	ssl? (
-		!libressl? ( dev-libs/openssl:0=[bindist=] )
+		!libressl? ( >=dev-libs/openssl-1.1.1:0=[bindist=] )
 		libressl? ( dev-libs/libressl:0= )
 	)
 "
@@ -31,8 +32,6 @@ RDEPEND="${DEPEND}
 	networkmanager? ( net-misc/networkmanager )
 "
 
-PATCHES=( "${FILESDIR}"/${PN}-5.15.0-libressl.patch )
-
 QT5_TARGET_SUBDIRS=(
 	src/network
 	src/plugins/bearer/generic
@@ -49,6 +48,8 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 	:network
 )
 
+PATCHES=( "${FILESDIR}"/${P}-libressl.patch ) # Bug 562050, not upstreamable
+
 pkg_setup() {
 	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
 	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
@@ -65,3 +66,12 @@ src_configure() {
 	)
 	qt5-build_src_configure
 }
+
+src_install() {
+	qt5-build_src_install
+	# workaround for bug 652650
+	if use ssl; then
+		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
+			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2022-01-20  1:29 Quentin Retornaz
  0 siblings, 0 replies; 12+ messages in thread
From: Quentin Retornaz @ 2022-01-20  1:29 UTC (permalink / raw
  To: gentoo-commits

commit:     ecc8b9aacec323b065486d85c252a9231b210080
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Jan 19 23:26:54 2022 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Thu Jan 20 01:29:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ecc8b9aa

dev-qt/qtnetwork: Updated for 5.15.2-r14

Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/377
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 dev-qt/qtnetwork/Manifest                          |   1 +
 .../files/qtnetwork-5.15.2-r14-libressl.patch      | 367 +++++++++++++++++++++
 dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild       |  80 +++++
 3 files changed, 448 insertions(+)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 6b292bf..bb0067a 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1,2 +1,3 @@
+DIST qtbase-5.15.2-38ad2f39.tar.gz 67969272 BLAKE2B 9071c96e8162d8141676f63aab82ca61ba29039e79066939fb74501187ae95cca34c924f1105827411f021efca2f40a62b7acde845d0d463604b234a3a8f8370 SHA512 df4f2dce732f62c797f77c266e268097f32a5d7605b3464c9a76d323d8ec069c902994df6afa28823d3c03f5d4ca0295cac47e28773b25e2f9387e3475f52f82
 DIST qtbase-5.15.2-7c6c0030.tar.gz 67967537 BLAKE2B 623b99942e9df9bc8ac436a21503060845f9e3532aa0e02ccd927762382be26091878fbe092e80c0ac68bead51d09647e40e0cf61361d62ad226ed46b221132b SHA512 eb88b21764591246c5f04f63405dbfcd39afb737e96bb29c7721644b9aba3ea95df24ed9699acfd03a8c088ee72efec1fb0267aef8d665d5ec72ee75fc08ecdc
 DIST qtbase-5.15.2-a4f9e569.tar.gz 67964648 BLAKE2B 2be7351221c46846ef37308a0238aa4a39369da63fe5c3be5e142ff700c80e125821c06b43c9e4e949bd9f285222a60888303aef956c9b427a9a6c8ee3bc6b1a SHA512 b4be8132a1d7119fd9728f7bf2d72cdd27d2092e7f178a1f15707204f5ffade7ce505c897fd658bb19274bdd6238b2eb16f7fcfedff2567877dc3458b4091388

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r14-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r14-libressl.patch
new file mode 100644
index 0000000..b0a1aaa
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r14-libressl.patch
@@ -0,0 +1,367 @@
+From bd917c12865c773b882f45a8ed66735e39b4f013 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Sat, 28 Nov 2020 06:12:22 +0200
+Subject: [PATCH] QSslSocket: add LibreSSL support
+
+Upstream-Status: Inappropriate
+[Upstream is not willing to accept any patches for LibreSSL support]
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+Signed-off-by: orbea <orbea@riseup.net>
+---
+ src/network/ssl/qsslcertificate_openssl.cpp   |  2 +-
+ src/network/ssl/qsslcontext_openssl.cpp       | 15 ++++--
+ src/network/ssl/qsslcontext_openssl_p.h       |  7 +++
+ src/network/ssl/qsslsocket_openssl.cpp        |  2 +-
+ .../ssl/qsslsocket_openssl_symbols.cpp        | 29 ++++++++++++
+ .../ssl/qsslsocket_openssl_symbols_p.h        | 47 ++++++++++++++++++-
+ 6 files changed, 94 insertions(+), 8 deletions(-)
+
+diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp
+index 5022b899..73be1cf2 100644
+--- a/src/network/ssl/qsslcertificate_openssl.cpp
++++ b/src/network/ssl/qsslcertificate_openssl.cpp
+@@ -691,7 +691,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
+         unsigned char *data = nullptr;
+         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
+         info.insert(name, QString::fromUtf8((char*)data, size));
+-#if QT_CONFIG(opensslv11)
++#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
+         q_CRYPTO_free(data, nullptr, 0);
+ #else
+         q_CRYPTO_free(data);
+diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
+index d0a428c2..319cfc00 100644
+--- a/src/network/ssl/qsslcontext_openssl.cpp
++++ b/src/network/ssl/qsslcontext_openssl.cpp
+@@ -77,9 +77,9 @@ extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
+ }
+ #endif // dtls
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+ extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
+ 
+ // Defined in qsslsocket.cpp
+ QList<QSslCipher> q_getDefaultDtlsCiphers();
+@@ -351,9 +351,11 @@ init_context:
+         return;
+     }
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     // A nasty hacked OpenSSL using a level that will make our auto-tests fail:
+     if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
+         q_SSL_CTX_set_security_level(sslContext->ctx, 1);
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+     const long anyVersion =
+ #if QT_CONFIG(dtls)
+@@ -627,14 +629,14 @@ init_context:
+                              q_X509Callback);
+     }
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+     // NewSessionTicket callback:
+     if (mode == QSslSocket::SslClientMode && !isDtls) {
+         q_SSL_CTX_sess_set_new_cb(sslContext->ctx, q_ssl_sess_set_new_cb);
+         q_SSL_CTX_set_session_cache_mode(sslContext->ctx, SSL_SESS_CACHE_CLIENT);
+     }
+ 
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
+ 
+ #if QT_CONFIG(dtls)
+     // DTLS cookies:
+@@ -722,6 +724,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+     }
+ #endif // ocsp
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+     if (cctx) {
+         q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
+@@ -768,7 +771,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+             sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
+             sslContext->errorCode = QSslError::UnspecifiedError;
+         }
+-    } else {
++    } else
++#endif // LIBRESSL_VERSION_NUMBER
++    {
+         sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
+         sslContext->errorCode = QSslError::UnspecifiedError;
+     }
+diff --git a/src/network/ssl/qsslcontext_openssl_p.h b/src/network/ssl/qsslcontext_openssl_p.h
+index 70cb97aa..01a61cf5 100644
+--- a/src/network/ssl/qsslcontext_openssl_p.h
++++ b/src/network/ssl/qsslcontext_openssl_p.h
+@@ -61,6 +61,13 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
++#ifndef DTLS_ANY_VERSION
++#define DTLS_ANY_VERSION 0x1FFFF
++#endif
++#ifndef TLS_ANY_VERSION
++#define TLS_ANY_VERSION 0x10000
++#endif
++
+ #ifndef QT_NO_SSL
+ 
+ class QSslContextPrivate;
+diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
+index af47dbf9..f4381efa 100644
+--- a/src/network/ssl/qsslsocket_openssl.cpp
++++ b/src/network/ssl/qsslsocket_openssl.cpp
+@@ -653,7 +653,7 @@ bool QSslSocketBackendPrivate::initSslContext()
+     else if (mode == QSslSocket::SslServerMode)
+         q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x10101006L
++#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
+     // Set the client callback for TLSv1.3 PSK
+     if (mode == QSslSocket::SslClientMode
+         && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+index 0f48e498..0b47ccde 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
++++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+@@ -145,10 +145,13 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return
+ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
+ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
+ DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+ DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
+ DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
+ DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
++#endif // OPENSSL_NO_DEPRECATED_3_0
+ DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
+ DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
+ DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+@@ -156,10 +159,20 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return null
+ DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
+ DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
++#else
++DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
++DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
++DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
++DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
++DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
++DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
+ DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
+ DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ #ifdef TLS1_3_VERSION
+ DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
+ DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
+@@ -183,7 +196,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
+ DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
+ DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
+ DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
++#else
++DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
++#endif
+ DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
+ DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
+ DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
+@@ -223,7 +240,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
+             ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
+             return 0, return)
+ DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
++#endif
+ DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
+ DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
+             int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
+@@ -355,12 +374,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
+ 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 nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, 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);
+ DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
+ DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
+ DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
++#endif
+ DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
+ DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
+ DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
+@@ -850,9 +871,11 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(ASN1_STRING_get0_data)
+     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
+     RESOLVEFUNC(EVP_PKEY_up_ref)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+     RESOLVEFUNC(EVP_PKEY_CTX_new)
+     RESOLVEFUNC(EVP_PKEY_param_check)
+     RESOLVEFUNC(EVP_PKEY_CTX_free)
++#endif // OPENSSL_NO_DEPRECATED_3_0
+     RESOLVEFUNC(RSA_bits)
+     RESOLVEFUNC(OPENSSL_sk_new_null)
+     RESOLVEFUNC(OPENSSL_sk_push)
+@@ -902,7 +925,9 @@ bool q_resolveOpenSslSymbols()
+ 
+     RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
+     RESOLVEFUNC(DH_bits)
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(DSA_bits)
++#endif
+ 
+ #if QT_CONFIG(dtls)
+     RESOLVEFUNC(DTLSv1_listen)
+@@ -932,7 +957,9 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(OCSP_check_validity)
+     RESOLVEFUNC(OCSP_cert_to_id)
+     RESOLVEFUNC(OCSP_id_get0_info)
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(OCSP_resp_get0_certs)
++#endif
+     RESOLVEFUNC(OCSP_basic_sign)
+     RESOLVEFUNC(OCSP_response_create)
+     RESOLVEFUNC(i2d_OCSP_RESPONSE)
+@@ -1062,12 +1089,14 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
+     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+     RESOLVEFUNC(SSL_CTX_get_cert_store);
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(SSL_CONF_CTX_new);
+     RESOLVEFUNC(SSL_CONF_CTX_free);
+     RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
+     RESOLVEFUNC(SSL_CONF_CTX_set_flags);
+     RESOLVEFUNC(SSL_CONF_CTX_finish);
+     RESOLVEFUNC(SSL_CONF_cmd);
++#endif
+     RESOLVEFUNC(SSL_accept)
+     RESOLVEFUNC(SSL_clear)
+     RESOLVEFUNC(SSL_connect)
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+index b36d0bc1..99412bf2 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
++++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+@@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE
+ 
+ #define DUMMYARG
+ 
++#ifdef LIBRESSL_VERSION_NUMBER
++typedef _STACK STACK;
++typedef STACK OPENSSL_STACK;
++typedef void OPENSSL_INIT_SETTINGS;
++typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
++#endif
++
+ #if !defined QT_LINKED_OPENSSL
+ // **************** Shared declarations ******************
+ // ret func(arg)
+@@ -230,19 +237,42 @@ const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
+ Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
+ Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
+ 
+-int q_DSA_bits(DSA *a);
++#ifndef LIBRESSL_VERSION_NUMBER
++int q_DSA_bits(DSA *a);o#else
++#else
++#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
++#endif
+ int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
+ Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+ EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
+ void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
++#endif // OPENSSL_NO_DEPRECATED_3_0
+ int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
+ int q_RSA_bits(RSA *a);
++
++#ifndef LIBRESSL_VERSION_NUMBER
+ Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
+ Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
+ Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
++#else // LIBRESSL_VERSION_NUMBER
++int q_sk_num(STACK *a);
++#define q_OPENSSL_sk_num(a) q_sk_num(a)
++void q_sk_pop_free(STACK *a, void (*b)(void *));
++#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
++STACK *q_sk_new_null();
++#define q_OPENSSL_sk_new_null() q_sk_new_null()
++void q_sk_push(STACK *st, void *data);
++#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
++void q_sk_free(STACK *a);
++#define q_OPENSSL_sk_free q_sk_free
++void *q_sk_value(STACK *a, int b);
++#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
++#endif // LIBRESSL_VERSION_NUMBER
++
+ int q_SSL_session_reused(SSL *a);
+ unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
+ int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+@@ -268,8 +298,13 @@ int q_DH_bits(DH *dh);
+ # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
+                                                        | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
+ #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
++#else
++#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
++#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+ #define q_OPENSSL_add_all_algorithms_conf()  q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
+                                                                    | OPENSSL_INIT_ADD_ALL_DIGESTS \
+@@ -278,7 +313,11 @@ int q_DH_bits(DH *dh);
+                                                                     | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
+ 
+ int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
++#ifndef LIBRESSL_VERSION_NUMBER
+ void q_CRYPTO_free(void *str, const char *file, int line);
++#else
++void q_CRYPTO_free(void *a);
++#endif
+ 
+ long q_OpenSSL_version_num();
+ const char *q_OpenSSL_version(int type);
+@@ -496,12 +535,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
+ 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);
++#ifndef 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);
+ unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
+ int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
+ int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
++#endif
+ void q_SSL_free(SSL *a);
+ STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
+ const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
+@@ -723,7 +764,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
+ int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
+                         ASN1_INTEGER **pserial, OCSP_CERTID *cid);
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
++#else
++#define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
++#endif
+ Q_AUTOTEST_EXPORT OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
+ Q_AUTOTEST_EXPORT void q_OCSP_CERTID_free(OCSP_CERTID *cid);
+ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+-- 
+2.34.1
+

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild
new file mode 100644
index 0000000..8ac35cf
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KDE_ORG_COMMIT=38ad2f39daec09168728033969265834b6a2d924
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+	KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+IUSE="connman dtls gssapi libproxy networkmanager sctp +ssl"
+REQUIRED_USE="!dtls"
+
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	sys-libs/zlib:=
+	connman? ( =dev-qt/qtdbus-${QT5_PV}* )
+	gssapi? ( virtual/krb5 )
+	libproxy? ( net-libs/libproxy )
+	networkmanager? ( =dev-qt/qtdbus-${QT5_PV}* )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	ssl? ( >=dev-libs/openssl-1.1.1:0= )
+"
+RDEPEND="${DEPEND}
+	connman? ( net-misc/connman )
+	networkmanager? ( net-misc/networkmanager )
+"
+
+QT5_TARGET_SUBDIRS=(
+	src/network
+	src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+	libproxy:libproxy:
+	ssl::SSL
+	ssl::OPENSSL
+	ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:network
+)
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-5.15.2-r14-libressl.patch # Bug 562050, not upstreamable
+)
+
+pkg_setup() {
+	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+	local myconf=(
+		$(usev connman -dbus-linked)
+		$(qt_use gssapi feature-gssapi)
+		$(qt_use libproxy)
+		$(usev networkmanager -dbus-linked)
+		$(qt_use sctp)
+		$(qt_use dtls)
+		$(usev ssl -openssl-linked)
+	)
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+
+	# workaround for bug 652650
+	if use ssl; then
+		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
+			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2022-05-01  0:19 Quentin Retornaz
  0 siblings, 0 replies; 12+ messages in thread
From: Quentin Retornaz @ 2022-05-01  0:19 UTC (permalink / raw
  To: gentoo-commits

commit:     c0884c4ab3ffd73a7bfb0fa9a318982ed6f7e070
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Apr 30 15:44:22 2022 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sun May  1 00:19:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c0884c4a

dev-qt/qtnetwork: Remove old versions

Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/401
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 .../files/qtnetwork-5.15.2-r11-libressl.patch      | 407 ---------------------
 dev-qt/qtnetwork/qtnetwork-5.15.2-r11.ebuild       |  80 ----
 dev-qt/qtnetwork/qtnetwork-5.15.2-r13.ebuild       |  80 ----
 dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild       |  80 ----
 4 files changed, 647 deletions(-)

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r11-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r11-libressl.patch
deleted file mode 100644
index 97e7f15..0000000
--- a/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r11-libressl.patch
+++ /dev/null
@@ -1,407 +0,0 @@
-From 89e6ffbf5e2febb9cedaf9e533fbcca9da398a2d Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <steils@gentoo.org>
-Date: Sat, 28 Nov 2020 06:12:22 +0200
-Subject: [PATCH] QSslSocket: add LibreSSL support
-
-Upstream-Status: Inappropriate
-[Upstream is not willing to accept any patches for LibreSSL support]
-Signed-off-by: Stefan Strogin <steils@gentoo.org>
-Signed-off-by: orbea <orbea@riseup.net>
----
- src/network/ssl/qsslcertificate_openssl.cpp   |  2 +-
- src/network/ssl/qsslcontext_openssl.cpp       | 27 ++++++++---
- src/network/ssl/qsslcontext_openssl_p.h       |  7 +++
- src/network/ssl/qsslsocket_openssl.cpp        |  2 +-
- .../ssl/qsslsocket_openssl_symbols.cpp        | 31 +++++++++++++
- .../ssl/qsslsocket_openssl_symbols_p.h        | 45 +++++++++++++++++++
- 6 files changed, 107 insertions(+), 7 deletions(-)
-
-diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp
-index ca9d61cc..19774432 100644
---- a/src/network/ssl/qsslcertificate_openssl.cpp
-+++ b/src/network/ssl/qsslcertificate_openssl.cpp
-@@ -661,7 +661,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
-         unsigned char *data = nullptr;
-         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
-         info.insert(name, QString::fromUtf8((char*)data, size));
--#if QT_CONFIG(opensslv11)
-+#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
-         q_CRYPTO_free(data, nullptr, 0);
- #else
-         q_CRYPTO_free(data);
-diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
-index c9f202f5..4963474c 100644
---- a/src/network/ssl/qsslcontext_openssl.cpp
-+++ b/src/network/ssl/qsslcontext_openssl.cpp
-@@ -77,9 +77,9 @@ extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
- }
- #endif // dtls
- 
--#ifdef TLS1_3_VERSION
-+#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
- extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
--#endif // TLS1_3_VERSION
-+#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
- 
- // Defined in qsslsocket.cpp
- QList<QSslCipher> q_getDefaultDtlsCiphers();
-@@ -351,9 +351,11 @@ init_context:
-         return;
-     }
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
-     // A nasty hacked OpenSSL using a level that will make our auto-tests fail:
-     if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
-         q_SSL_CTX_set_security_level(sslContext->ctx, 1);
-+#endif // LIBRESSL_VERSION_NUMBER
- 
-     const long anyVersion =
- #if QT_CONFIG(dtls)
-@@ -408,16 +410,28 @@ init_context:
-         maxVersion = DTLS1_VERSION;
-         break;
-     case QSsl::DtlsV1_0OrLater:
-+#ifdef DTLS_MAX_VERSION
-         minVersion = DTLS1_VERSION;
-         maxVersion = DTLS_MAX_VERSION;
-+#else
-+        Q_UNREACHABLE();
-+#endif // DTLS_MAX_VERSION
-         break;
-     case QSsl::DtlsV1_2:
-+#ifdef DTLS1_2_VERSION
-         minVersion = DTLS1_2_VERSION;
-         maxVersion = DTLS1_2_VERSION;
-+#else
-+        Q_UNREACHABLE();
-+#endif // DTLS1_2_VERSION
-         break;
-     case QSsl::DtlsV1_2OrLater:
-+#if defined(DTLS1_2_VERSION) && defined(DTLS_MAX_VERSION)
-         minVersion = DTLS1_2_VERSION;
-         maxVersion = DTLS_MAX_VERSION;
-+#else
-+        Q_UNREACHABLE();
-+#endif // DTLS1_2_VERSION && DTLS_MAX_VERSION
-         break;
-     case QSsl::TlsV1_3OrLater:
- #ifdef TLS1_3_VERSION
-@@ -627,14 +641,14 @@ init_context:
-                              q_X509Callback);
-     }
- 
--#ifdef TLS1_3_VERSION
-+#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
-     // NewSessionTicket callback:
-     if (mode == QSslSocket::SslClientMode && !isDtls) {
-         q_SSL_CTX_sess_set_new_cb(sslContext->ctx, q_ssl_sess_set_new_cb);
-         q_SSL_CTX_set_session_cache_mode(sslContext->ctx, SSL_SESS_CACHE_CLIENT);
-     }
- 
--#endif // TLS1_3_VERSION
-+#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
- 
- #if QT_CONFIG(dtls)
-     // DTLS cookies:
-@@ -722,6 +736,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
-     }
- #endif // ocsp
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
-     QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
-     if (cctx) {
-         q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
-@@ -768,7 +783,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
-             sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
-             sslContext->errorCode = QSslError::UnspecifiedError;
-         }
--    } else {
-+    } else
-+#endif // LIBRESSL_VERSION_NUMBER
-+    {
-         sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
-         sslContext->errorCode = QSslError::UnspecifiedError;
-     }
-diff --git a/src/network/ssl/qsslcontext_openssl_p.h b/src/network/ssl/qsslcontext_openssl_p.h
-index 70cb97aa..01a61cf5 100644
---- a/src/network/ssl/qsslcontext_openssl_p.h
-+++ b/src/network/ssl/qsslcontext_openssl_p.h
-@@ -61,6 +61,13 @@
- 
- QT_BEGIN_NAMESPACE
- 
-+#ifndef DTLS_ANY_VERSION
-+#define DTLS_ANY_VERSION 0x1FFFF
-+#endif
-+#ifndef TLS_ANY_VERSION
-+#define TLS_ANY_VERSION 0x10000
-+#endif
-+
- #ifndef QT_NO_SSL
- 
- class QSslContextPrivate;
-diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
-index af47dbf9..f4381efa 100644
---- a/src/network/ssl/qsslsocket_openssl.cpp
-+++ b/src/network/ssl/qsslsocket_openssl.cpp
-@@ -653,7 +653,7 @@ bool QSslSocketBackendPrivate::initSslContext()
-     else if (mode == QSslSocket::SslServerMode)
-         q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
- 
--#if OPENSSL_VERSION_NUMBER >= 0x10101006L
-+#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
-     // Set the client callback for TLSv1.3 PSK
-     if (mode == QSslSocket::SslClientMode
-         && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
-diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-index ed80fc14..6941b4db 100644
---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
-+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-@@ -145,11 +145,14 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return
- DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
- DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
- DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
-+#ifdef OPENSSL_NO_DEPRECATED_3_0
- DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
- DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
- DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
-+#endif // OPENSSL_NO_DEPRECATED_3_0
- DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
- DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
- DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
- DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-@@ -157,10 +160,20 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return null
- DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
- DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
- DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
-+#else
-+DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
-+DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-+DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
-+DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
-+DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
-+DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
-+#endif // LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
- DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
- DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
-+#endif // LIBRESSL_VERSION_NUMBER
- #ifdef TLS1_3_VERSION
- DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
- DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
-@@ -184,7 +197,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
- DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
- DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
- DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
-+#else
-+DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
-+#endif
- DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
- DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
- DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
-@@ -224,7 +241,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
-             ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
-             return 0, return)
- DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
-+#endif
- DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
- DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
-             int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
-@@ -356,12 +375,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
- 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 nullptr, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, 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);
- DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
- DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
- DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
-+#endif
- DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
- DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
- DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
-@@ -845,17 +866,21 @@ bool q_resolveOpenSslSymbols()
-     RESOLVEFUNC(ASN1_STRING_get0_data)
-     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
-     RESOLVEFUNC(EVP_PKEY_up_ref)
-+#ifdef OPENSSL_NO_DEPRECATED_3_0
-     RESOLVEFUNC(EVP_PKEY_CTX_new)
-     RESOLVEFUNC(EVP_PKEY_param_check)
-     RESOLVEFUNC(EVP_PKEY_CTX_free)
-+#endif // OPENSSL_NO_DEPRECATED_3_0
-     RESOLVEFUNC(EVP_PKEY_base_id)
-     RESOLVEFUNC(RSA_bits)
-+#ifndef LIBRESSL_VERSION_NUMBER
-     RESOLVEFUNC(OPENSSL_sk_new_null)
-     RESOLVEFUNC(OPENSSL_sk_push)
-     RESOLVEFUNC(OPENSSL_sk_free)
-     RESOLVEFUNC(OPENSSL_sk_num)
-     RESOLVEFUNC(OPENSSL_sk_pop_free)
-     RESOLVEFUNC(OPENSSL_sk_value)
-+#endif
-     RESOLVEFUNC(DH_get0_pqg)
-     RESOLVEFUNC(SSL_CTX_set_options)
-     RESOLVEFUNC(SSL_CTX_get_security_level)
-@@ -898,7 +923,9 @@ bool q_resolveOpenSslSymbols()
- 
-     RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
-     RESOLVEFUNC(DH_bits)
-+#ifndef LIBRESSL_VERSION_NUMBER
-     RESOLVEFUNC(DSA_bits)
-+#endif
- 
- #if QT_CONFIG(dtls)
-     RESOLVEFUNC(DTLSv1_listen)
-@@ -928,7 +955,9 @@ bool q_resolveOpenSslSymbols()
-     RESOLVEFUNC(OCSP_check_validity)
-     RESOLVEFUNC(OCSP_cert_to_id)
-     RESOLVEFUNC(OCSP_id_get0_info)
-+#ifndef LIBRESSL_VERSION_NUMBER
-     RESOLVEFUNC(OCSP_resp_get0_certs)
-+#endif
-     RESOLVEFUNC(OCSP_basic_sign)
-     RESOLVEFUNC(OCSP_response_create)
-     RESOLVEFUNC(i2d_OCSP_RESPONSE)
-@@ -1058,12 +1087,14 @@ bool q_resolveOpenSslSymbols()
-     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
-     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
-     RESOLVEFUNC(SSL_CTX_get_cert_store);
-+#ifndef LIBRESSL_VERSION_NUMBER
-     RESOLVEFUNC(SSL_CONF_CTX_new);
-     RESOLVEFUNC(SSL_CONF_CTX_free);
-     RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
-     RESOLVEFUNC(SSL_CONF_CTX_set_flags);
-     RESOLVEFUNC(SSL_CONF_CTX_finish);
-     RESOLVEFUNC(SSL_CONF_cmd);
-+#endif
-     RESOLVEFUNC(SSL_accept)
-     RESOLVEFUNC(SSL_clear)
-     RESOLVEFUNC(SSL_connect)
-diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
-index c46afcf5..42a31119 100644
---- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
-+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
-@@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE
- 
- #define DUMMYARG
- 
-+#ifdef LIBRESSL_VERSION_NUMBER
-+typedef _STACK STACK;
-+typedef STACK OPENSSL_STACK;
-+typedef void OPENSSL_INIT_SETTINGS;
-+typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
-+#endif
-+
- #if !defined QT_LINKED_OPENSSL
- // **************** Shared declarations ******************
- // ret func(arg)
-@@ -230,20 +237,43 @@ const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
- Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
- Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- int q_DSA_bits(DSA *a);
-+#else
-+#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
-+#endif
- int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
- Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
-+#ifdef OPENSSL_NO_DEPRECATED_3_0
- EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
- void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
- int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
-+#endif // OPENSSL_NO_DEPRECATED_3_0
- int q_EVP_PKEY_base_id(EVP_PKEY *a);
- int q_RSA_bits(RSA *a);
-+
-+#ifndef LIBRESSL_VERSION_NUMBER
- Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
- Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
- Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
- Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
- Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
- Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
-+#else // LIBRESSL_VERSION_NUMBER
-+int q_sk_num(STACK *a);
-+#define q_OPENSSL_sk_num(a) q_sk_num(a)
-+void q_sk_pop_free(STACK *a, void (*b)(void *));
-+#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
-+STACK *q_sk_new_null();
-+#define q_OPENSSL_sk_new_null() q_sk_new_null()
-+void q_sk_push(STACK *st, void *data);
-+#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
-+void q_sk_free(STACK *a);
-+#define q_OPENSSL_sk_free q_sk_free
-+void *q_sk_value(STACK *a, int b);
-+#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
-+#endif // LIBRESSL_VERSION_NUMBER
-+
- int q_SSL_session_reused(SSL *a);
- unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
- int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-@@ -269,8 +299,13 @@ int q_DH_bits(DH *dh);
- # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
-                                                        | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
- #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
-+#else
-+#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
-+#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
-+#endif // LIBRESSL_VERSION_NUMBER
- 
- #define q_OPENSSL_add_all_algorithms_conf()  q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
-                                                                    | OPENSSL_INIT_ADD_ALL_DIGESTS \
-@@ -279,7 +314,11 @@ int q_DH_bits(DH *dh);
-                                                                     | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
- 
- int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-+#ifndef LIBRESSL_VERSION_NUMBER
- void q_CRYPTO_free(void *str, const char *file, int line);
-+#else
-+void q_CRYPTO_free(void *a);
-+#endif
- 
- long q_OpenSSL_version_num();
- const char *q_OpenSSL_version(int type);
-@@ -497,12 +536,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
- 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);
-+#ifndef 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);
- unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
- int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
- int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
-+#endif
- void q_SSL_free(SSL *a);
- STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
- const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
-@@ -728,7 +769,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
- int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
-                         ASN1_INTEGER **pserial, OCSP_CERTID *cid);
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
-+#else
-+#define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
-+#endif
- Q_AUTOTEST_EXPORT OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
- Q_AUTOTEST_EXPORT void q_OCSP_CERTID_free(OCSP_CERTID *cid);
- int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
--- 
-2.32.0
-

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.2-r11.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.2-r11.ebuild
deleted file mode 100644
index 463019c..0000000
--- a/dev-qt/qtnetwork/qtnetwork-5.15.2-r11.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-KDE_ORG_COMMIT=a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd
-QT5_MODULE="qtbase"
-inherit qt5-build
-
-DESCRIPTION="Network abstraction library for the Qt5 framework"
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~riscv ~sparc x86"
-fi
-
-IUSE="bindist connman dtls gssapi libproxy networkmanager sctp +ssl"
-REQUIRED_USE="!dtls"
-
-DEPEND="
-	=dev-qt/qtcore-${QT5_PV}*:5=
-	sys-libs/zlib:=
-	connman? ( =dev-qt/qtdbus-${QT5_PV}* )
-	gssapi? ( virtual/krb5 )
-	libproxy? ( net-libs/libproxy )
-	networkmanager? ( =dev-qt/qtdbus-${QT5_PV}* )
-	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
-	ssl? ( >=dev-libs/openssl-1.1.1:0=[bindist(-)=] )
-"
-RDEPEND="${DEPEND}
-	connman? ( net-misc/connman )
-	networkmanager? ( net-misc/networkmanager )
-"
-
-QT5_TARGET_SUBDIRS=(
-	src/network
-	src/plugins/bearer/generic
-)
-
-QT5_GENTOO_CONFIG=(
-	libproxy:libproxy:
-	ssl::SSL
-	ssl::OPENSSL
-	ssl:openssl-linked:LINKED_OPENSSL
-)
-
-QT5_GENTOO_PRIVATE_CONFIG=(
-	:network
-)
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.15.2-r11-libressl.patch # Bug 562050, not upstreamable
-)
-
-pkg_setup() {
-	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
-	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
-}
-
-src_configure() {
-	local myconf=(
-		$(usev connman -dbus-linked)
-		$(qt_use gssapi feature-gssapi)
-		$(qt_use libproxy)
-		$(usev networkmanager -dbus-linked)
-		$(qt_use sctp)
-		$(qt_use dtls)
-		$(usev ssl -openssl-linked)
-	)
-	qt5-build_src_configure
-}
-
-src_install() {
-	qt5-build_src_install
-
-	# workaround for bug 652650
-	if use ssl; then
-		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
-			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
-	fi
-}

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.2-r13.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.2-r13.ebuild
deleted file mode 100644
index c9d0b35..0000000
--- a/dev-qt/qtnetwork/qtnetwork-5.15.2-r13.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-KDE_ORG_COMMIT=7c6c0030cf80ef7b9ace42996b0e0c3a72f76860
-QT5_MODULE="qtbase"
-inherit qt5-build
-
-DESCRIPTION="Network abstraction library for the Qt5 framework"
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~riscv ~sparc x86"
-fi
-
-IUSE="connman dtls gssapi libproxy networkmanager sctp +ssl"
-REQUIRED_USE="!dtls"
-
-DEPEND="
-	=dev-qt/qtcore-${QT5_PV}*:5=
-	sys-libs/zlib:=
-	connman? ( =dev-qt/qtdbus-${QT5_PV}* )
-	gssapi? ( virtual/krb5 )
-	libproxy? ( net-libs/libproxy )
-	networkmanager? ( =dev-qt/qtdbus-${QT5_PV}* )
-	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
-	ssl? ( >=dev-libs/openssl-1.1.1:0= )
-"
-RDEPEND="${DEPEND}
-	connman? ( net-misc/connman )
-	networkmanager? ( net-misc/networkmanager )
-"
-
-QT5_TARGET_SUBDIRS=(
-	src/network
-	src/plugins/bearer/generic
-)
-
-QT5_GENTOO_CONFIG=(
-	libproxy:libproxy:
-	ssl::SSL
-	ssl::OPENSSL
-	ssl:openssl-linked:LINKED_OPENSSL
-)
-
-QT5_GENTOO_PRIVATE_CONFIG=(
-	:network
-)
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.15.2-r11-libressl.patch # Bug 562050, not upstreamable
-)
-
-pkg_setup() {
-	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
-	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
-}
-
-src_configure() {
-	local myconf=(
-		$(usev connman -dbus-linked)
-		$(qt_use gssapi feature-gssapi)
-		$(qt_use libproxy)
-		$(usev networkmanager -dbus-linked)
-		$(qt_use sctp)
-		$(qt_use dtls)
-		$(usev ssl -openssl-linked)
-	)
-	qt5-build_src_configure
-}
-
-src_install() {
-	qt5-build_src_install
-
-	# workaround for bug 652650
-	if use ssl; then
-		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
-			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
-	fi
-}

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild
deleted file mode 100644
index 8ac35cf..0000000
--- a/dev-qt/qtnetwork/qtnetwork-5.15.2-r14.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-KDE_ORG_COMMIT=38ad2f39daec09168728033969265834b6a2d924
-QT5_MODULE="qtbase"
-inherit qt5-build
-
-DESCRIPTION="Network abstraction library for the Qt5 framework"
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-IUSE="connman dtls gssapi libproxy networkmanager sctp +ssl"
-REQUIRED_USE="!dtls"
-
-DEPEND="
-	=dev-qt/qtcore-${QT5_PV}*:5=
-	sys-libs/zlib:=
-	connman? ( =dev-qt/qtdbus-${QT5_PV}* )
-	gssapi? ( virtual/krb5 )
-	libproxy? ( net-libs/libproxy )
-	networkmanager? ( =dev-qt/qtdbus-${QT5_PV}* )
-	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
-	ssl? ( >=dev-libs/openssl-1.1.1:0= )
-"
-RDEPEND="${DEPEND}
-	connman? ( net-misc/connman )
-	networkmanager? ( net-misc/networkmanager )
-"
-
-QT5_TARGET_SUBDIRS=(
-	src/network
-	src/plugins/bearer/generic
-)
-
-QT5_GENTOO_CONFIG=(
-	libproxy:libproxy:
-	ssl::SSL
-	ssl::OPENSSL
-	ssl:openssl-linked:LINKED_OPENSSL
-)
-
-QT5_GENTOO_PRIVATE_CONFIG=(
-	:network
-)
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.15.2-r14-libressl.patch # Bug 562050, not upstreamable
-)
-
-pkg_setup() {
-	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
-	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
-}
-
-src_configure() {
-	local myconf=(
-		$(usev connman -dbus-linked)
-		$(qt_use gssapi feature-gssapi)
-		$(qt_use libproxy)
-		$(usev networkmanager -dbus-linked)
-		$(qt_use sctp)
-		$(qt_use dtls)
-		$(usev ssl -openssl-linked)
-	)
-	qt5-build_src_configure
-}
-
-src_install() {
-	qt5-build_src_install
-
-	# workaround for bug 652650
-	if use ssl; then
-		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
-			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2022-10-07 21:11 Quentin Retornaz
  0 siblings, 0 replies; 12+ messages in thread
From: Quentin Retornaz @ 2022-10-07 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     23788a0df9e848714e75d7042f096fcfc4318b2e
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Oct  7 17:59:26 2022 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Fri Oct  7 21:11:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=23788a0d

dev-qt/qtnetwork: Remove old version

Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 .../files/qtnetwork-5.15.2-r14-libressl.patch      | 369 ---------------------
 dev-qt/qtnetwork/metadata.xml                      |   1 -
 dev-qt/qtnetwork/qtnetwork-5.15.4.ebuild           |  80 -----
 3 files changed, 450 deletions(-)

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r14-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r14-libressl.patch
deleted file mode 100644
index 1a61fc9..0000000
--- a/dev-qt/qtnetwork/files/qtnetwork-5.15.2-r14-libressl.patch
+++ /dev/null
@@ -1,369 +0,0 @@
-From bd917c12865c773b882f45a8ed66735e39b4f013 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <steils@gentoo.org>
-Date: Sat, 28 Nov 2020 06:12:22 +0200
-Subject: [PATCH] QSslSocket: add LibreSSL support
-
-Upstream-Status: Inappropriate
-[Upstream is not willing to accept any patches for LibreSSL support]
-Signed-off-by: Stefan Strogin <steils@gentoo.org>
-Signed-off-by: orbea <orbea@riseup.net>
----
- src/network/ssl/qsslcertificate_openssl.cpp   |  2 +-
- src/network/ssl/qsslcontext_openssl.cpp       | 15 ++++--
- src/network/ssl/qsslcontext_openssl_p.h       |  7 +++
- src/network/ssl/qsslsocket_openssl.cpp        |  2 +-
- .../ssl/qsslsocket_openssl_symbols.cpp        | 29 ++++++++++++
- .../ssl/qsslsocket_openssl_symbols_p.h        | 47 ++++++++++++++++++-
- 6 files changed, 94 insertions(+), 8 deletions(-)
-
-diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp
-index 5022b899..73be1cf2 100644
---- a/src/network/ssl/qsslcertificate_openssl.cpp
-+++ b/src/network/ssl/qsslcertificate_openssl.cpp
-@@ -691,7 +691,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
-         unsigned char *data = nullptr;
-         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
-         info.insert(name, QString::fromUtf8((char*)data, size));
--#if QT_CONFIG(opensslv11)
-+#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
-         q_CRYPTO_free(data, nullptr, 0);
- #else
-         q_CRYPTO_free(data);
-diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
-index d0a428c2..319cfc00 100644
---- a/src/network/ssl/qsslcontext_openssl.cpp
-+++ b/src/network/ssl/qsslcontext_openssl.cpp
-@@ -77,9 +77,9 @@ extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
- }
- #endif // dtls
-
--#ifdef TLS1_3_VERSION
-+#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
- extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
--#endif // TLS1_3_VERSION
-+#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
-
- // Defined in qsslsocket.cpp
- QList<QSslCipher> q_getDefaultDtlsCiphers();
-@@ -351,9 +351,11 @@ init_context:
-         return;
-     }
-
-+#ifndef LIBRESSL_VERSION_NUMBER
-     // A nasty hacked OpenSSL using a level that will make our auto-tests fail:
-     if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
-         q_SSL_CTX_set_security_level(sslContext->ctx, 1);
-+#endif // LIBRESSL_VERSION_NUMBER
-
-     const long anyVersion =
- #if QT_CONFIG(dtls)
-@@ -627,14 +629,14 @@ init_context:
-                              q_X509Callback);
-     }
-
--#ifdef TLS1_3_VERSION
-+#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
-     // NewSessionTicket callback:
-     if (mode == QSslSocket::SslClientMode && !isDtls) {
-         q_SSL_CTX_sess_set_new_cb(sslContext->ctx, q_ssl_sess_set_new_cb);
-         q_SSL_CTX_set_session_cache_mode(sslContext->ctx, SSL_SESS_CACHE_CLIENT);
-     }
-
--#endif // TLS1_3_VERSION
-+#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
-
- #if QT_CONFIG(dtls)
-     // DTLS cookies:
-@@ -722,6 +724,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
-     }
- #endif // ocsp
-
-+#ifndef LIBRESSL_VERSION_NUMBER
-     QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
-     if (cctx) {
-         q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
-@@ -768,7 +771,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
-             sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
-             sslContext->errorCode = QSslError::UnspecifiedError;
-         }
--    } else {
-+    } else
-+#endif // LIBRESSL_VERSION_NUMBER
-+    {
-         sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
-         sslContext->errorCode = QSslError::UnspecifiedError;
-     }
-diff --git a/src/network/ssl/qsslcontext_openssl_p.h b/src/network/ssl/qsslcontext_openssl_p.h
-index 70cb97aa..01a61cf5 100644
---- a/src/network/ssl/qsslcontext_openssl_p.h
-+++ b/src/network/ssl/qsslcontext_openssl_p.h
-@@ -61,6 +61,13 @@
-
- QT_BEGIN_NAMESPACE
-
-+#ifndef DTLS_ANY_VERSION
-+#define DTLS_ANY_VERSION 0x1FFFF
-+#endif
-+#ifndef TLS_ANY_VERSION
-+#define TLS_ANY_VERSION 0x10000
-+#endif
-+
- #ifndef QT_NO_SSL
-
- class QSslContextPrivate;
-diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
-index af47dbf9..f4381efa 100644
---- a/src/network/ssl/qsslsocket_openssl.cpp
-+++ b/src/network/ssl/qsslsocket_openssl.cpp
-@@ -653,7 +653,7 @@ bool QSslSocketBackendPrivate::initSslContext()
-     else if (mode == QSslSocket::SslServerMode)
-         q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
-
--#if OPENSSL_VERSION_NUMBER >= 0x10101006L
-+#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
-     // Set the client callback for TLSv1.3 PSK
-     if (mode == QSslSocket::SslClientMode
-         && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
-diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-index 0f48e498..0b47ccde 100644
---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
-+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
-@@ -145,10 +145,15 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return
- DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
- DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
- DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
-+#ifdef OPENSSL_NO_DEPRECATED_3_0
- DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
- DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
- DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
-+#endif // OPENSSL_NO_DEPRECATED_3_0
- DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
-+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
- DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
-+#endif
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
- DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-@@ -156,10 +159,20 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return null
- DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
- DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
- DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
-+#else
-+DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
-+DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-+DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
-+DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
-+DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
-+DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
-+#endif // LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
- DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
- DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
-+#endif // LIBRESSL_VERSION_NUMBER
- #ifdef TLS1_3_VERSION
- DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
- DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
-@@ -183,7 +196,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
- DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
- DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
- DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
-+#else
-+DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
-+#endif
- DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
- DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
- DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
-@@ -223,7 +240,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
-             ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
-             return 0, return)
- DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
-+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
- DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
-+#endif
- DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
- DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
-             int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
-@@ -355,12 +374,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
- 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 nullptr, return)
-+#ifndef LIBRESSL_VERSION_NUMBER
- DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, 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);
- DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
- DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
- DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
-+#endif
- DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
- DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
- DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
-@@ -850,9 +871,11 @@ bool q_resolveOpenSslSymbols()
-     RESOLVEFUNC(ASN1_STRING_get0_data)
-     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
-     RESOLVEFUNC(EVP_PKEY_up_ref)
-+#ifdef OPENSSL_NO_DEPRECATED_3_0
-     RESOLVEFUNC(EVP_PKEY_CTX_new)
-     RESOLVEFUNC(EVP_PKEY_param_check)
-     RESOLVEFUNC(EVP_PKEY_CTX_free)
-+#endif // OPENSSL_NO_DEPRECATED_3_0
-     RESOLVEFUNC(RSA_bits)
-     RESOLVEFUNC(OPENSSL_sk_new_null)
-     RESOLVEFUNC(OPENSSL_sk_push)
-@@ -902,7 +925,9 @@ bool q_resolveOpenSslSymbols()
-
-     RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
-     RESOLVEFUNC(DH_bits)
-+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
-     RESOLVEFUNC(DSA_bits)
-+#endif
-
- #if QT_CONFIG(dtls)
-     RESOLVEFUNC(DTLSv1_listen)
-@@ -932,7 +957,9 @@ bool q_resolveOpenSslSymbols()
-     RESOLVEFUNC(OCSP_check_validity)
-     RESOLVEFUNC(OCSP_cert_to_id)
-     RESOLVEFUNC(OCSP_id_get0_info)
-+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
-     RESOLVEFUNC(OCSP_resp_get0_certs)
-+#endif
-     RESOLVEFUNC(OCSP_basic_sign)
-     RESOLVEFUNC(OCSP_response_create)
-     RESOLVEFUNC(i2d_OCSP_RESPONSE)
-@@ -1062,12 +1089,14 @@ bool q_resolveOpenSslSymbols()
-     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
-     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
-     RESOLVEFUNC(SSL_CTX_get_cert_store);
-+#ifndef LIBRESSL_VERSION_NUMBER
-     RESOLVEFUNC(SSL_CONF_CTX_new);
-     RESOLVEFUNC(SSL_CONF_CTX_free);
-     RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
-     RESOLVEFUNC(SSL_CONF_CTX_set_flags);
-     RESOLVEFUNC(SSL_CONF_CTX_finish);
-     RESOLVEFUNC(SSL_CONF_cmd);
-+#endif
-     RESOLVEFUNC(SSL_accept)
-     RESOLVEFUNC(SSL_clear)
-     RESOLVEFUNC(SSL_connect)
-diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
-index b36d0bc1..99412bf2 100644
---- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
-+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
-@@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE
-
- #define DUMMYARG
-
-+#ifdef LIBRESSL_VERSION_NUMBER
-+typedef _STACK STACK;
-+typedef STACK OPENSSL_STACK;
-+typedef void OPENSSL_INIT_SETTINGS;
-+typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
-+#endif
-+
- #if !defined QT_LINKED_OPENSSL
- // **************** Shared declarations ******************
- // ret func(arg)
-@@ -230,19 +237,42 @@ const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
- Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
- Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
-
--int q_DSA_bits(DSA *a);
-+#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3050000fL)
-+#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
-+#else
-+int q_DSA_bits(DSA *a);
-+#endif
- int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
- Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
-+#ifdef OPENSSL_NO_DEPRECATED_3_0
- EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
- void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
-+#endif // OPENSSL_NO_DEPRECATED_3_0
- int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
- int q_RSA_bits(RSA *a);
-+
-+#ifndef LIBRESSL_VERSION_NUMBER
- Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
- Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
- Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
- Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
- Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
- Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
-+#else // LIBRESSL_VERSION_NUMBER
-+int q_sk_num(STACK *a);
-+#define q_OPENSSL_sk_num(a) q_sk_num(a)
-+void q_sk_pop_free(STACK *a, void (*b)(void *));
-+#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
-+STACK *q_sk_new_null();
-+#define q_OPENSSL_sk_new_null() q_sk_new_null()
-+void q_sk_push(STACK *st, void *data);
-+#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
-+void q_sk_free(STACK *a);
-+#define q_OPENSSL_sk_free q_sk_free
-+void *q_sk_value(STACK *a, int b);
-+#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
-+#endif // LIBRESSL_VERSION_NUMBER
-+
- int q_SSL_session_reused(SSL *a);
- unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
- int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-@@ -268,8 +298,13 @@ int q_DH_bits(DH *dh);
- # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
-                                                        | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
- #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
-+#else
-+#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
-+#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
-+#endif // LIBRESSL_VERSION_NUMBER
-
- #define q_OPENSSL_add_all_algorithms_conf()  q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
-                                                                    | OPENSSL_INIT_ADD_ALL_DIGESTS \
-@@ -278,7 +313,11 @@ int q_DH_bits(DH *dh);
-                                                                     | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
-
- int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-+#ifndef LIBRESSL_VERSION_NUMBER
- void q_CRYPTO_free(void *str, const char *file, int line);
-+#else
-+void q_CRYPTO_free(void *a);
-+#endif
-
- long q_OpenSSL_version_num();
- const char *q_OpenSSL_version(int type);
-@@ -496,12 +535,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
- 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);
-+#ifndef 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);
- unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
- int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
- int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
-+#endif
- void q_SSL_free(SSL *a);
- STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
- const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
-@@ -723,7 +764,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
- int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
-                         ASN1_INTEGER **pserial, OCSP_CERTID *cid);
-
-+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
-+#  define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
-+#else
- const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
-+#endif
- Q_AUTOTEST_EXPORT OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
- Q_AUTOTEST_EXPORT void q_OCSP_CERTID_free(OCSP_CERTID *cid);
- int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
---
-2.34.1
-

diff --git a/dev-qt/qtnetwork/metadata.xml b/dev-qt/qtnetwork/metadata.xml
index 7c239ff..8a8481b 100644
--- a/dev-qt/qtnetwork/metadata.xml
+++ b/dev-qt/qtnetwork/metadata.xml
@@ -7,7 +7,6 @@
 	</maintainer>
 	<use>
 		<flag name="connman">Enable <pkg>net-misc/connman</pkg>-based bearer plugin</flag>
-		<flag name="dtls">Support for Datagram Transport Layer Security (can cause build issues with libressl)</flag>
 		<flag name="gssapi">Enable support for GSSAPI (<pkg>virtual/krb5</pkg>)</flag>
 		<flag name="libproxy">Use <pkg>net-libs/libproxy</pkg> for automatic
 			HTTP/SOCKS proxy configuration</flag>

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.4.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.4.ebuild
deleted file mode 100644
index 7896f58..0000000
--- a/dev-qt/qtnetwork/qtnetwork-5.15.4.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-QT5_KDEPATCHSET_REV=1
-QT5_MODULE="qtbase"
-inherit qt5-build
-
-DESCRIPTION="Network abstraction library for the Qt5 framework"
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86"
-fi
-
-IUSE="connman dtls gssapi libproxy networkmanager sctp +ssl"
-REQUIRED_USE="!dtls"
-
-DEPEND="
-	=dev-qt/qtcore-${QT5_PV}*:5=
-	sys-libs/zlib:=
-	connman? ( =dev-qt/qtdbus-${QT5_PV}* )
-	gssapi? ( virtual/krb5 )
-	libproxy? ( net-libs/libproxy )
-	networkmanager? ( =dev-qt/qtdbus-${QT5_PV}* )
-	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
-	ssl? ( >=dev-libs/openssl-1.1.1:0= )
-"
-RDEPEND="${DEPEND}
-	connman? ( net-misc/connman )
-	networkmanager? ( net-misc/networkmanager )
-"
-
-QT5_TARGET_SUBDIRS=(
-	src/network
-	src/plugins/bearer/generic
-)
-
-QT5_GENTOO_CONFIG=(
-	libproxy:libproxy:
-	ssl::SSL
-	ssl::OPENSSL
-	ssl:openssl-linked:LINKED_OPENSSL
-)
-
-QT5_GENTOO_PRIVATE_CONFIG=(
-	:network
-)
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.15.2-r14-libressl.patch # Bug 562050, not upstreamable
-)
-
-pkg_setup() {
-	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
-	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
-}
-
-src_configure() {
-	local myconf=(
-		$(usev connman -dbus-linked)
-		$(qt_use gssapi feature-gssapi)
-		$(qt_use libproxy)
-		$(usev networkmanager -dbus-linked)
-		$(qt_use sctp)
-		$(qt_use dtls)
-		$(usev ssl -openssl-linked)
-	)
-	qt5-build_src_configure
-}
-
-src_install() {
-	qt5-build_src_install
-
-	# workaround for bug 652650
-	if use ssl; then
-		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
-			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2022-12-01 18:19 Quentin Retornaz
  0 siblings, 0 replies; 12+ messages in thread
From: Quentin Retornaz @ 2022-12-01 18:19 UTC (permalink / raw
  To: gentoo-commits

commit:     905e47b8328eec88fd9b02fa71934ed0aeb729d2
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Nov 30 19:37:00 2022 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Thu Dec  1 18:18:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=905e47b8

dev-qt/qtnetwork: Add 5.15.7

The patch was rebased and trimmed down from the 5.15.5 version.

Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/478
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 dev-qt/qtnetwork/Manifest                          |   5 +-
 .../files/qtnetwork-5.15.7-libressl.patch          | 253 +++++++++++++++++++++
 dev-qt/qtnetwork/qtnetwork-5.15.7.ebuild           |  79 +++++++
 3 files changed, 335 insertions(+), 2 deletions(-)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 271f1b4..fa3592d 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1,5 +1,6 @@
 DIST qtbase-5.15-gentoo-patchset-1.tar.xz 4204 BLAKE2B 1399eb6f4c776d370e1837351a72b604440658a3a2d1bd0c725b9ef149b09d236347f5f4b37f652c33310048a0a7df54e24453b404dc45507fd4f7c5fdf144cd SHA512 c857fc746bacb047321cdb762f3c7c48ce2a0d24045a9e708edd38532568dbbc74e9e971425a72a3c2a5ca0662b3e6333831f6c1b7746525b99d46000b63111f
-DIST qtbase-5.15.4-gentoo-kde-1.tar.xz 507288 BLAKE2B a22d3745d3c690e29f7726cc464e3721777768e6e4f937e84ee2d2e14a13bcf7724e0c30b2cf4277c9ac7dadc1078545e14fb5459fbc3acc7259fb3e39e2f417 SHA512 a52bdf189e4c0fe341c2db0a5923a3600503d8eaa0c3693923a02a0ab4fa6dfc1beb21067f4723fcf2e4d7c71e39a496bf34e109e1e1c8c42922ff53f6712373
+DIST qtbase-5.15-gentoo-patchset-2.tar.xz 3844 BLAKE2B 6dcb69398cf8a6b1be737e8c7bf1041529c4e704ca892cef10ba3bc5ce435c903607b64e981cf8aa12c785b3e423aa1d52bce1f67ec1bd8dbb1421dfb6f62700 SHA512 b7fd7e17bcab2f9803c7bfc0473082ee4640299c23ce8da943ef80ed181e880ebc9157bcebde28077e80e6f907aa14a59c42416b3e32f49baebd54fbe5a37497
 DIST qtbase-5.15.5-gentoo-kde-1.tar.xz 520224 BLAKE2B 48807bc79cede557b114786ee072d8d94545f4ada3d96aa4fe04dbf79a356dc6c17d9299014ed70aa10296346c30c7512fb7d9f88ee4b301e9a54a241363be8b SHA512 ab9f27d506d7aa1a9339ba52d51daffb4c6f9abb5d858fd728ef2110528bc0f2ae101b4e2e7c344836b42e4aafa2c5a4ab5c5fa37465e692cce500c0f3347fa7
-DIST qtbase-everywhere-opensource-src-5.15.4.tar.xz 50225468 BLAKE2B 3525126791ca168ea4227bc58bef0202f4cec68396c958b0e7f09e7b41ca9d70bbcf0e78b5e7997bc3e4a59e889128f93964b5d0a9db7d012403581cff3dc30b SHA512 91a1d95c2891939ae55134e8897cbc423142bd8eda954a1e65bb563b0932ed9e2da34db374fd86858b4a819e8abe824a967b31f4fb316528ec8aaf15016c6ad3
+DIST qtbase-5.15.7-gentoo-kde-1.tar.xz 798056 BLAKE2B 3c7fefa65ab6de25c2c82261ad0f1371e32acd4bd4b3303f20a5ebf36d19690df94290d102c65e4941a6c51a5d5f2db0253bafca5ac85cf480f7434405cb2671 SHA512 20ab17220489009c98d7f783a02614507e157974c7cb16f47d50d3954ccd1cd065562effc393df6e07c9ba6ad8ccd4e6b3f0bf5b5b890183b8631b8b570bf064
 DIST qtbase-everywhere-opensource-src-5.15.5.tar.xz 50247388 BLAKE2B e9bbfe8e73e6f25ccadeef722818b5aeb82d1f136bec21fcbc3b26bf76044b38f25c7268010c648e1161e9b61013b8b775f17b9fdcfdd70402bdfbf70bf7f9d5 SHA512 ce80eedc88abbd5a200bacc10a8e94adc1ef2122ac220715ba084adf1e32d67f2dc66168503de5fb5b5a6ab15f7a75ca23dc9956aed12ead994a8ffa6291ef87
+DIST qtbase-everywhere-opensource-src-5.15.7.tar.xz 50260196 BLAKE2B 69029a910af0e3bfe742b5870334406e03274b0677ef47f9c7c10f730ff031bae49bd21a686497215505b19a183ca395c275d8afefaaa903125297f8e693bb4d SHA512 316de71fba1d5dd91354155dcd0f77e1ce2a798f8296a8699a795ea5e86ad10b6e233299775a92e23328290f3e041240585947e89ee7bd39eb464c5f0ffec343

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch
new file mode 100644
index 0000000..c9e7653
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch
@@ -0,0 +1,253 @@
+From 282db75a652b230c83b3d99954b7a3fc2f6ae64c Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Wed, 30 Nov 2022 10:58:50 -0800
+Subject: [PATCH] QSslSocket: add LibreSSL support
+
+Upstream-Status: Inappropriate
+[Upstream is not willing to accept any patches for LibreSSL support]
+
+diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp
+index d1794d4d..1f1aa5ed 100644
+--- a/src/network/ssl/qsslcertificate_openssl.cpp
++++ b/src/network/ssl/qsslcertificate_openssl.cpp
+@@ -727,7 +727,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
+         unsigned char *data = nullptr;
+         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
+         info.insert(name, QString::fromUtf8((char*)data, size));
+-#if QT_CONFIG(opensslv11)
++#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
+         q_CRYPTO_free(data, nullptr, 0);
+ #else
+         q_CRYPTO_free(data);
+diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
+index c992da9d..f659255a 100644
+--- a/src/network/ssl/qsslcontext_openssl.cpp
++++ b/src/network/ssl/qsslcontext_openssl.cpp
+@@ -77,9 +77,9 @@ extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
+ }
+ #endif // dtls
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+ extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
+ 
+ // Defined in qsslsocket.cpp
+ QList<QSslCipher> q_getDefaultDtlsCiphers();
+@@ -351,9 +351,11 @@ init_context:
+         return;
+     }
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     // A nasty hacked OpenSSL using a level that will make our auto-tests fail:
+     if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
+         q_SSL_CTX_set_security_level(sslContext->ctx, 1);
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+     const long anyVersion =
+ #if QT_CONFIG(dtls)
+@@ -627,14 +629,14 @@ init_context:
+                              q_X509Callback);
+     }
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+     // NewSessionTicket callback:
+     if (mode == QSslSocket::SslClientMode && !isDtls) {
+         q_SSL_CTX_sess_set_new_cb(sslContext->ctx, q_ssl_sess_set_new_cb);
+         q_SSL_CTX_set_session_cache_mode(sslContext->ctx, SSL_SESS_CACHE_CLIENT);
+     }
+ 
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
+ 
+ #if QT_CONFIG(dtls)
+     // DTLS cookies:
+@@ -722,6 +724,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+     }
+ #endif // ocsp
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+     if (cctx) {
+         q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
+@@ -768,7 +771,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+             sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
+             sslContext->errorCode = QSslError::UnspecifiedError;
+         }
+-    } else {
++    } else
++#endif // LIBRESSL_VERSION_NUMBER
++    {
+         sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
+         sslContext->errorCode = QSslError::UnspecifiedError;
+     }
+diff --git a/src/network/ssl/qsslcontext_openssl_p.h b/src/network/ssl/qsslcontext_openssl_p.h
+index 70cb97aa..01a61cf5 100644
+--- a/src/network/ssl/qsslcontext_openssl_p.h
++++ b/src/network/ssl/qsslcontext_openssl_p.h
+@@ -61,6 +61,13 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
++#ifndef DTLS_ANY_VERSION
++#define DTLS_ANY_VERSION 0x1FFFF
++#endif
++#ifndef TLS_ANY_VERSION
++#define TLS_ANY_VERSION 0x10000
++#endif
++
+ #ifndef QT_NO_SSL
+ 
+ class QSslContextPrivate;
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+index d9742fd6..fac28b5c 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
++++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+@@ -150,16 +150,27 @@ DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
+ DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
+ DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
+ DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
+ DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
+ DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
+ DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
++#else
++DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
++DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
++DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
++DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
++DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
++DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
+ DEFINEFUNC2(qssloptions, SSL_CTX_set_options, SSL_CTX *ctx, ctx, qssloptions op, op, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
+ DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ #ifdef TLS1_3_VERSION
+ DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
+ DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
+@@ -185,7 +196,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
+ DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
+ DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
+ DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
++#else
++DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
++#endif
+ DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
+ DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
+ DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
+@@ -358,12 +373,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
+ 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 nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, 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);
+ DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
+ DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
+ DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
++#endif
+ DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
+ DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
+ DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
+@@ -1089,12 +1106,14 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
+     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+     RESOLVEFUNC(SSL_CTX_get_cert_store);
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(SSL_CONF_CTX_new);
+     RESOLVEFUNC(SSL_CONF_CTX_free);
+     RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
+     RESOLVEFUNC(SSL_CONF_CTX_set_flags);
+     RESOLVEFUNC(SSL_CONF_CTX_finish);
+     RESOLVEFUNC(SSL_CONF_cmd);
++#endif
+     RESOLVEFUNC(SSL_accept)
+     RESOLVEFUNC(SSL_clear)
+     RESOLVEFUNC(SSL_connect)
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+index 27aeffa1..32a21221 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
++++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+@@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE
+ 
+ #define DUMMYARG
+ 
++#ifdef LIBRESSL_VERSION_NUMBER
++typedef _STACK STACK;
++typedef STACK OPENSSL_STACK;
++typedef void OPENSSL_INIT_SETTINGS;
++typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
++#endif
++
+ #if !defined QT_LINKED_OPENSSL
+ // **************** Shared declarations ******************
+ // ret func(arg)
+@@ -238,12 +245,28 @@ EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
+ void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
+ int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
+ int q_RSA_bits(RSA *a);
++#ifndef LIBRESSL_VERSION_NUMBER
+ Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
+ Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
+ Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
+ Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
++#else // LIBRESSL_VERSION_NUMBER
++int q_sk_num(STACK *a);
++#define q_OPENSSL_sk_num(a) q_sk_num(a)
++void q_sk_pop_free(STACK *a, void (*b)(void *));
++#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
++STACK *q_sk_new_null();
++#define q_OPENSSL_sk_new_null() q_sk_new_null()
++void q_sk_push(STACK *st, void *data);
++#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
++void q_sk_free(STACK *a);
++#define q_OPENSSL_sk_free q_sk_free
++void *q_sk_value(STACK *a, int b);
++#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
++#endif // LIBRESSL_VERSION_NUMBER
++
+ int q_SSL_session_reused(SSL *a);
+ qssloptions q_SSL_CTX_set_options(SSL_CTX *ctx, qssloptions op);
+ int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+@@ -497,12 +520,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
+ 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);
++#ifndef 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);
+ unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
+ int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
+ int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
++#endif // LIBRESSL_VERSION_NUMBER
+ void q_SSL_free(SSL *a);
+ STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
+ const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
+@@ -743,8 +768,13 @@ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+ 
+ void *q_CRYPTO_malloc(size_t num, const char *file, int line);
+ #define q_OPENSSL_malloc(num) q_CRYPTO_malloc(num, "", 0)
++#ifndef LIBRESSL_VERSION_NUMBER
+ void q_CRYPTO_free(void *str, const char *file, int line);
+ #define q_OPENSSL_free(addr) q_CRYPTO_free(addr, "", 0)
++#else // LIBRESSL_VERSION_NUMBER
++void q_CRYPTO_free(void *a);
++#define q_OPENSSL_free(addr) q_CRYPTO_free(addr)
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+ int q_SSL_CTX_get_security_level(const SSL_CTX *ctx);
+ void q_SSL_CTX_set_security_level(SSL_CTX *ctx, int level);

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.7.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.7.ebuild
new file mode 100644
index 0000000..ce836b8
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.7.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != *9999* ]]; then
+	QT5_KDEPATCHSET_REV=1
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+IUSE="connman gssapi libproxy networkmanager sctp +ssl"
+
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	sys-libs/zlib:=
+	connman? ( =dev-qt/qtdbus-${QT5_PV}* )
+	gssapi? ( virtual/krb5 )
+	libproxy? ( net-libs/libproxy )
+	networkmanager? ( =dev-qt/qtdbus-${QT5_PV}* )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	ssl? ( >=dev-libs/openssl-1.1.1:0= )
+"
+RDEPEND="${DEPEND}
+	connman? ( net-misc/connman )
+	networkmanager? ( net-misc/networkmanager )
+"
+
+QT5_TARGET_SUBDIRS=(
+	src/network
+	src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+	libproxy:libproxy:
+	ssl::SSL
+	ssl::OPENSSL
+	ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:network
+)
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-5.15.7-libressl.patch # Bug 562050, not upstreamable
+)
+
+pkg_setup() {
+	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+	local myconf=(
+		$(usev connman -dbus-linked)
+		$(qt_use gssapi feature-gssapi)
+		$(qt_use libproxy)
+		$(usev networkmanager -dbus-linked)
+		$(qt_use sctp)
+		$(usev ssl -openssl-linked)
+		-no-dtls # Required for libressl
+	)
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+
+	# workaround for bug 652650
+	if use ssl; then
+		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
+			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2023-05-31 15:34 orbea
  0 siblings, 0 replies; 12+ messages in thread
From: orbea @ 2023-05-31 15:34 UTC (permalink / raw
  To: gentoo-commits

commit:     ad5d5f2a2e54df66b56222a3ac635ca74de50b17
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed May 31 15:09:36 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed May 31 15:09:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ad5d5f2a

dev-qt/qtnetwork: sync ::gentoo

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../qtnetwork-5.15.9-libproxy-0.5-pkgconfig.patch  | 32 ++++++++++++++++++++++
 dev-qt/qtnetwork/qtnetwork-5.15.9-r2.ebuild        |  3 +-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.9-libproxy-0.5-pkgconfig.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.9-libproxy-0.5-pkgconfig.patch
new file mode 100644
index 0000000..d245531
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.9-libproxy-0.5-pkgconfig.patch
@@ -0,0 +1,32 @@
+From df809fd0b505b61d718fe1dc7fe19a79f9336cd9 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed, 24 May 2023 20:21:33 +0200
+Subject: [PATCH] Use pkgconfig in order to find libproxy configuration
+
+>=libproxy-0.5 moved proxy.h into a non-default include search path.
+
+See also:
+https://github.com/libproxy/libproxy/issues/226#issuecomment-1557064225
+https://bugs.gentoo.org/906879
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ src/network/configure.json | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/network/configure.json b/src/network/configure.json
+index 271ff164ac..ffba2d1eea 100644
+--- a/src/network/configure.json
++++ b/src/network/configure.json
+@@ -53,7 +53,7 @@
+             },
+             "headers": "proxy.h",
+             "sources": [
+-                "-lproxy"
++                { "type": "pkgConfig", "args": "libproxy-1.0" }
+             ]
+         },
+         "openssl_headers": {
+-- 
+2.40.1
+

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.9-r2.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.9-r2.ebuild
index 45eeceb..2e9886e 100644
--- a/dev-qt/qtnetwork/qtnetwork-5.15.9-r2.ebuild
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.9-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 if [[ ${PV} != *9999* ]]; then
 	QT5_KDEPATCHSET_REV=1
-	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
 fi
 
 QT5_MODULE="qtbase"
@@ -34,6 +34,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-5.15.7-libressl.patch" #562050
 	"${FILESDIR}/${P}-QDnsLookup-dont-overflow-the-buffer.patch"
 	"${FILESDIR}/${P}-CVE-2023-32762.patch"
+	"${FILESDIR}/${P}-libproxy-0.5-pkgconfig.patch"
 )
 
 QT5_TARGET_SUBDIRS=(


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2023-06-13  3:45 orbea
  0 siblings, 0 replies; 12+ messages in thread
From: orbea @ 2023-06-13  3:45 UTC (permalink / raw
  To: gentoo-commits

commit:     bfa63407717e18916b47899d9380f569479b45e4
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Jun 13 03:42:01 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Jun 13 03:42:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=bfa63407

dev-qt/qtnetwork: add 5.15.9-r3

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../files/qtnetwork-5.15.9-CVE-2023-34410.patch    | 113 +++++++++++++++++++++
 dev-qt/qtnetwork/qtnetwork-5.15.9-r3.ebuild        |  83 +++++++++++++++
 2 files changed, 196 insertions(+)

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.9-CVE-2023-34410.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.9-CVE-2023-34410.patch
new file mode 100644
index 0000000..3c91452
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.9-CVE-2023-34410.patch
@@ -0,0 +1,113 @@
+From 51a3c8d7b8140f0bf6912d14a58bcd0092b868a1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
+Date: Wed, 10 May 2023 16:43:41 +0200
+Subject: [PATCH 1/2] Schannel: Reject certificate not signed by a configured
+ CA certificate
+
+Not entirely clear why, but when building the certificate chain for a
+peer the system certificate store is searched for root certificates.
+General expectation is that after calling
+`sslConfiguration.setCaCertificates()` the system certificates will
+not be taken into consideration.
+
+To work around this behavior, we do a manual check that the root of the
+chain is part of the configured CA certificates.
+
+Pick-to: 6.5 6.2 5.15
+Change-Id: I03666a4d9b0eac39ae97e150b4743120611a11b3
+Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
+Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
+(cherry picked from commit ada2c573c1a25f8d96577734968fe317ddfa292a)
+---
+ src/network/ssl/qsslsocket_schannel.cpp | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/network/ssl/qsslsocket_schannel.cpp b/src/network/ssl/qsslsocket_schannel.cpp
+index c956ce3c2b..d1b23af29b 100644
+--- a/src/network/ssl/qsslsocket_schannel.cpp
++++ b/src/network/ssl/qsslsocket_schannel.cpp
+@@ -1880,6 +1880,28 @@ bool QSslSocketBackendPrivate::verifyCertContext(CERT_CONTEXT *certContext)
+     if (configuration.peerVerifyDepth > 0 && DWORD(configuration.peerVerifyDepth) < verifyDepth)
+         verifyDepth = DWORD(configuration.peerVerifyDepth);
+ 
++    const auto &caCertificates = q->sslConfiguration().caCertificates();
++
++    if (!rootCertOnDemandLoadingAllowed()
++            && !(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_PARTIAL_CHAIN)
++            && (q->peerVerifyMode() == QSslSocket::VerifyPeer
++                    || (isClient && q->peerVerifyMode() == QSslSocket::AutoVerifyPeer))) {
++        // When verifying a peer Windows "helpfully" builds a chain that
++        // may include roots from the system store. But we don't want that if
++        // the user has set their own CA certificates.
++        // Since Windows claims this is not a partial chain the root is included
++        // and we have to check that it is one of our configured CAs.
++        CERT_CHAIN_ELEMENT *element = chain->rgpElement[chain->cElement - 1];
++        QSslCertificate certificate = getCertificateFromChainElement(element);
++        if (!caCertificates.contains(certificate)) {
++            auto error = QSslError(QSslError::CertificateUntrusted, certificate);
++            sslErrors += error;
++            emit q->peerVerifyError(error);
++            if (q->state() != QAbstractSocket::ConnectedState)
++                return false;
++        }
++    }
++
+     for (DWORD i = 0; i < verifyDepth; i++) {
+         CERT_CHAIN_ELEMENT *element = chain->rgpElement[i];
+         QSslCertificate certificate = getCertificateFromChainElement(element);
+-- 
+2.41.0
+
+
+From a933f89e1f69b97ccb9d1e5f82d9a619c02afcd2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
+Date: Thu, 25 May 2023 14:40:29 +0200
+Subject: [PATCH 2/2] Ssl: Copy the on-demand cert loading bool from default
+ config
+
+Otherwise individual sockets will still load system certificates when
+a chain doesn't match against the configured CA certificates.
+That's not intended behavior, since specifically setting the CA
+certificates means you don't want the system certificates to be used.
+
+Follow-up to/amends ada2c573c1a25f8d96577734968fe317ddfa292a
+
+This is potentially a breaking change because now, if you ever add a
+CA to the default config, it will disable loading system certificates
+on demand for all sockets. And the only way to re-enable it is to
+create a null-QSslConfiguration and set it as the new default.
+
+Pick-to: 6.5 6.2 5.15
+Change-Id: Ic3b2ab125c0cdd58ad654af1cb36173960ce2d1e
+Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
+(cherry picked from commit 57ba6260c0801055b7188fdaa1818b940590f5f1)
+---
+ src/network/ssl/qsslsocket.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
+index 5bb6e7ee4a..2a0b3a4f1d 100644
+--- a/src/network/ssl/qsslsocket.cpp
++++ b/src/network/ssl/qsslsocket.cpp
+@@ -2221,6 +2221,10 @@ QSslSocketPrivate::QSslSocketPrivate()
+     , flushTriggered(false)
+ {
+     QSslConfigurationPrivate::deepCopyDefaultConfiguration(&configuration);
++    // If the global configuration doesn't allow root certificates to be loaded
++    // on demand then we have to disable it for this socket as well.
++    if (!configuration.allowRootCertOnDemandLoading)
++        allowRootCertOnDemandLoading = false;
+ }
+ 
+ /*!
+@@ -2470,6 +2474,7 @@ void QSslConfigurationPrivate::deepCopyDefaultConfiguration(QSslConfigurationPri
+     ptr->sessionProtocol = global->sessionProtocol;
+     ptr->ciphers = global->ciphers;
+     ptr->caCertificates = global->caCertificates;
++    ptr->allowRootCertOnDemandLoading = global->allowRootCertOnDemandLoading;
+     ptr->protocol = global->protocol;
+     ptr->peerVerifyMode = global->peerVerifyMode;
+     ptr->peerVerifyDepth = global->peerVerifyDepth;
+-- 
+2.41.0
+

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.9-r3.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.9-r3.ebuild
new file mode 100644
index 0000000..a166a59
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.9-r3.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != *9999* ]]; then
+	QT5_KDEPATCHSET_REV=1
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+IUSE="connman gssapi libproxy networkmanager sctp +ssl"
+
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	sys-libs/zlib:=
+	connman? ( =dev-qt/qtdbus-${QT5_PV}* )
+	gssapi? ( virtual/krb5 )
+	libproxy? ( net-libs/libproxy )
+	networkmanager? ( =dev-qt/qtdbus-${QT5_PV}* )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	ssl? ( >=dev-libs/openssl-1.1.1:0= )
+"
+RDEPEND="${DEPEND}
+	connman? ( net-misc/connman )
+	networkmanager? ( net-misc/networkmanager )
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.15.7-libressl.patch" #562050
+	"${FILESDIR}/${P}-QDnsLookup-dont-overflow-the-buffer.patch"
+	"${FILESDIR}/${P}-CVE-2023-32762.patch"
+	"${FILESDIR}/${P}-libproxy-0.5-pkgconfig.patch"
+	"${FILESDIR}/${P}-CVE-2023-34410.patch"
+)
+
+QT5_TARGET_SUBDIRS=(
+	src/network
+	src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+	libproxy:libproxy:
+	ssl::SSL
+	ssl::OPENSSL
+	ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:network
+)
+
+pkg_setup() {
+	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+	local myconf=(
+		$(usev connman -dbus-linked)
+		$(qt_use gssapi feature-gssapi)
+		$(qt_use libproxy)
+		$(usev networkmanager -dbus-linked)
+		$(qt_use sctp)
+		$(usev ssl -openssl-linked)
+		-no-dtls # Required for libressl
+	)
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+
+	# workaround for bug 652650
+	if use ssl; then
+		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
+			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/
@ 2023-07-12 14:50 orbea
  0 siblings, 0 replies; 12+ messages in thread
From: orbea @ 2023-07-12 14:50 UTC (permalink / raw
  To: gentoo-commits

commit:     8c3ceb68f54b39010d700743884cf1fe79af5986
Author:     Saki Xi <space_raccoon <AT> riseup <DOT> net>
AuthorDate: Wed Jul 12 14:20:22 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Jul 12 14:47:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=8c3ceb68

dev-qt/qtnetwork: Sync ::gentoo

Signed-off-by: Saki Xi <space_raccoon <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/533
Signed-off-by: orbea <orbea <AT> riseup.net>

 ...etwork-5.15.10-ssl-upgr-default-DH-params.patch | 101 +++++++++++++++++++++
 ...15.10-r1.ebuild => qtnetwork-5.15.10-r2.ebuild} |   3 +-
 2 files changed, 103 insertions(+), 1 deletion(-)

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.10-ssl-upgr-default-DH-params.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.10-ssl-upgr-default-DH-params.patch
new file mode 100644
index 0000000..94f1325
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.10-ssl-upgr-default-DH-params.patch
@@ -0,0 +1,101 @@
+From 05406c3f5f516d3148254c8294e8883c28a2c95a Mon Sep 17 00:00:00 2001
+From: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+Date: Wed, 21 Jun 2023 13:30:35 +0200
+Subject: [PATCH] SSL: upgrade the default DH parameters
+
+We have been using as default DH parameters the 1024-bit MODP group.
+This is now considered insecure, and applications should use the
+2048-bit at a minimum [1]. This commit therefore replaces the parameters
+with the 2048-bit MODP group from [2].
+
+To double check the data, use openssl asn1parse to verify that the prime
+matches. For instance:
+
+1) put the encoded string in a `encoded.txt` file (c&p from the source,
+   removing the double quotes)
+2) put the hexadecimal value of the 2048-bit group in a `reference.txt`
+   file (c&p from [2])
+3) compare the output of openssl asn1parse with the reference. For
+   instance like this:
+
+    $ diff <(openssl asn1parse < encoded.txt | grep -m 1 INTEGER | perl -pe 's/.*://; s/\n//') <(perl -0777 -pe 's/\s//g' reference.txt) && echo OK
+    OK
+
+[1] https://datatracker.ietf.org/doc/html/rfc8247#section-2.4
+[2] https://datatracker.ietf.org/doc/html/rfc3526#section-3
+
+[ChangeLog][QtNetwork][QSslDiffieHellmanParameters] The default
+Diffie-Hellman parameters are now using the 2048-bit MODP group from
+RFC 3526.
+
+Pick-to: 6.6 6.5 6.2 5.15
+Change-Id: I47133cd78ba0e954b8f93a3da09fa2c760c9f7a8
+Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
+(cherry picked from commit 3ec24e329c9ef6802786a37f30ddd8982e903480)
+---
+ src/network/ssl/qsslconfiguration.cpp           | 12 ++++++++++--
+ src/network/ssl/qssldiffiehellmanparameters.cpp | 13 +++++++------
+ 2 files changed, 17 insertions(+), 8 deletions(-)
+
+diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
+index f5ce02807f..84a9187334 100644
+--- a/src/network/ssl/qsslconfiguration.cpp
++++ b/src/network/ssl/qsslconfiguration.cpp
+@@ -929,7 +929,11 @@ void QSslConfiguration::setPreSharedKeyIdentityHint(const QByteArray &hint)
+     Retrieves the current set of Diffie-Hellman parameters.
+ 
+     If no Diffie-Hellman parameters have been set, the QSslConfiguration object
+-    defaults to using the 1024-bit MODP group from RFC 2409.
++    defaults to using the 2048-bit MODP group from RFC 3526.
++
++    \note The default parameters may change in future Qt versions.
++    Please check the documentation of the \e{exact Qt version} that you
++    are using in order to know what defaults that version uses.
+  */
+ QSslDiffieHellmanParameters QSslConfiguration::diffieHellmanParameters() const
+ {
+@@ -943,7 +947,11 @@ QSslDiffieHellmanParameters QSslConfiguration::diffieHellmanParameters() const
+     a server to \a dhparams.
+ 
+     If no Diffie-Hellman parameters have been set, the QSslConfiguration object
+-    defaults to using the 1024-bit MODP group from RFC 2409.
++    defaults to using the 2048-bit MODP group from RFC 3526.
++
++    \note The default parameters may change in future Qt versions.
++    Please check the documentation of the \e{exact Qt version} that you
++    are using in order to know what defaults that version uses.
+  */
+ void QSslConfiguration::setDiffieHellmanParameters(const QSslDiffieHellmanParameters &dhparams)
+ {
+diff --git a/src/network/ssl/qssldiffiehellmanparameters.cpp b/src/network/ssl/qssldiffiehellmanparameters.cpp
+index 7807afaa30..7c2505a0be 100644
+--- a/src/network/ssl/qssldiffiehellmanparameters.cpp
++++ b/src/network/ssl/qssldiffiehellmanparameters.cpp
+@@ -68,17 +68,18 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
+-// The 1024-bit MODP group from RFC 2459 (Second Oakley Group)
++// The 2048-bit MODP group from RFC 3526
+ Q_AUTOTEST_EXPORT const char *qssl_dhparams_default_base64 =
+-    "MIGHAoGBAP//////////yQ/aoiFowjTExmKLgNwc0SkCTgiKZ8x0Agu+pjsTmyJR"
+-    "Sgh5jjQE3e+VGbPNOkMbMCsKbfJfFDdP4TVtbVHCReSFtXZiXn7G9ExC6aY37WsL"
+-    "/1y29Aa37e44a/taiZ+lrp8kEXxLH+ZJKGZR7OZTgf//////////AgEC";
++    "MIIBCAKCAQEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxObIlFKCHmO"
++    "NATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjftawv/XLb0Brft7jhr"
++    "+1qJn6WunyQRfEsf5kkoZlHs5Fs9wgB8uKFjvwWY2kg2HFXTmmkWP6j9JM9fg2VdI9yjrZYc"
++    "YvNWIIVSu57VKQdwlpZtZww1Tkq8mATxdGwIyhghfDKQXkYuNs474553LBgOhgObJ4Oi7Aei"
++    "j7XFXfBvTFLJ3ivL9pVYFxg5lUl86pVq5RXSJhiY+gUQFXKOWoqsqmj//////////wIBAg==";
+ 
+ /*!
+     Returns the default QSslDiffieHellmanParameters used by QSslSocket.
+ 
+-    This is currently the 1024-bit MODP group from RFC 2459, also
+-    known as the Second Oakley Group.
++    This is currently the 2048-bit MODP group from RFC 3526.
+ */
+ QSslDiffieHellmanParameters QSslDiffieHellmanParameters::defaultParameters()
+ {
+-- 
+2.41.0
+

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.10-r1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.10-r2.ebuild
similarity index 90%
rename from dev-qt/qtnetwork/qtnetwork-5.15.10-r1.ebuild
rename to dev-qt/qtnetwork/qtnetwork-5.15.10-r2.ebuild
index d3e6e8a..42ddb35 100644
--- a/dev-qt/qtnetwork/qtnetwork-5.15.10-r1.ebuild
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.10-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 if [[ ${PV} != *9999* ]]; then
 	QT5_KDEPATCHSET_REV=1
-	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+	KEYWORDS="amd64 arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~sparc x86"
 fi
 
 QT5_MODULE="qtbase"
@@ -27,6 +27,7 @@ RDEPEND="${DEPEND}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-5.15.7-libressl.patch" #562050
+	"${FILESDIR}/${P}-ssl-upgr-default-DH-params.patch"
 )
 
 QT5_TARGET_SUBDIRS=(


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-12 14:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-28 19:18 [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/files/, dev-qt/qtnetwork/ Stefan Strogin
  -- strict thread matches above, loose matches on Subject: below --
2023-07-12 14:50 orbea
2023-06-13  3:45 orbea
2023-05-31 15:34 orbea
2022-12-01 18:19 Quentin Retornaz
2022-10-07 21:11 Quentin Retornaz
2022-05-01  0:19 Quentin Retornaz
2022-01-20  1:29 Quentin Retornaz
2020-11-28 19:22 Stefan Strogin
2020-05-27  8:15 Stefan Strogin
2019-03-02  0:51 Stefan Strogin
2019-03-02  0:51 Stefan Strogin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox