aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaki Xi <space_raccoon@riseup.net>2023-07-12 16:20:22 +0200
committerorbea <orbea@riseup.net>2023-07-12 07:47:58 -0700
commit8c3ceb68f54b39010d700743884cf1fe79af5986 (patch)
tree719870eae9c3935275d5285b161d13bd326e084c /dev-qt/qtnetwork
parentapp-emulation/spice: stabilize 0.15.2 for amd64 (diff)
downloadlibressl-8c3ceb68f54b39010d700743884cf1fe79af5986.tar.gz
libressl-8c3ceb68f54b39010d700743884cf1fe79af5986.tar.bz2
libressl-8c3ceb68f54b39010d700743884cf1fe79af5986.zip
dev-qt/qtnetwork: Sync ::gentoo
Signed-off-by: Saki Xi <space_raccoon@riseup.net> Closes: https://github.com/gentoo/libressl/pull/533 Signed-off-by: orbea <orbea@riseup.net>
Diffstat (limited to 'dev-qt/qtnetwork')
-rw-r--r--dev-qt/qtnetwork/files/qtnetwork-5.15.10-ssl-upgr-default-DH-params.patch101
-rw-r--r--dev-qt/qtnetwork/qtnetwork-5.15.10-r2.ebuild (renamed from dev-qt/qtnetwork/qtnetwork-5.15.10-r1.ebuild)3
2 files changed, 103 insertions, 1 deletions
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
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=(