public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qt6-qtbase] epel9: Adjust for https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile removals
@ 2026-10-08 17:15 Adam Williamson
  0 siblings, 0 replies; only message in thread
From: Adam Williamson @ 2026-10-08 17:15 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/qt6-qtbase
            Branch : epel9
            Commit : 0e85496669f757f803f46943e2e487a09eb6419b
            Author : Adam Williamson <awilliam@redhat.com>
            Date   : 2025-07-28T14:25:11-07:00
            Stats  : +73/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/qt6-qtbase/c/0e85496669f757f803f46943e2e487a09eb6419b?branch=epel9

            Log:
            Adjust for https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile removals

Backport of https://codereview.qt-project.org/c/qt/qtbase/+/664056

---
diff --git a/0001-Update-SSL-trust-store-locations-for-modern-Red-Hat.patch b/0001-Update-SSL-trust-store-locations-for-modern-Red-Hat.patch
new file mode 100644
index 0000000..4ee642c
--- /dev/null
+++ b/0001-Update-SSL-trust-store-locations-for-modern-Red-Hat.patch
@@ -0,0 +1,65 @@
+From 10a6f2b2d27ad2372c314bd1f2b21e225ece069b Mon Sep 17 00:00:00 2001
+From: Adam Williamson <awilliam@redhat.com>
+Date: Mon, 28 Jul 2025 11:52:41 -0700
+Subject: [PATCH] Update SSL trust store locations for modern Red Hat
+
+Red Hat family distros haven't used /usr/share/ssl since 2004:
+https://bugzilla.redhat.com/show_bug.cgi?id=143392
+
+/etc/ssl/certs has never been a canonical location on Red Hat
+family distros, and as of
+https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile is
+being removed. The same change also removes
+/etc/pki/tls/certs/ca-bundle.crt . This updates both magic lists
+with the modern canonical locations for Red Hat and derived
+distros. The tls-ca-bundle.pem bundle has been around in Fedora
+since around 2013:
+https://src.fedoraproject.org/rpms/ca-certificates/c/d538ada99cda951da7da3a72dc5eea06f02be212
+The directory-hash dir has been around since around 2021:
+https://src.fedoraproject.org/rpms/ca-certificates/c/1c8b67fb5ab3954a308d019461bb30d50412087e
+
+As I blogged in 2015, it is generally a bad idea to be trying to
+second-guess your SSL library about this stuff. OpenSSL has
+`SSL_CTX_set_default_verify_paths` etc.; why not use them? At
+least in the first instance; you can fall back to magic lists if
+that fails.
+
+https://www.happyassassin.net/posts/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/
+
+Signed-off-by: Adam Williamson <awilliam@redhat.com>
+---
+ src/network/ssl/qsslsocket.cpp                  | 3 ++-
+ src/plugins/tls/openssl/qtlsbackend_openssl.cpp | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
+index 395394d4325..b4d954be5a4 100644
+--- a/src/network/ssl/qsslsocket.cpp
++++ b/src/network/ssl/qsslsocket.cpp
+@@ -2962,7 +2962,8 @@ QList<QByteArray> QSslSocketPrivate::unixRootCertDirectories()
+     static const QByteArray dirs[] = {
+         ba("/etc/ssl/certs/"), // (K)ubuntu, OpenSUSE, Mandriva ...
+         ba("/usr/lib/ssl/certs/"), // Gentoo, Mandrake
+-        ba("/usr/share/ssl/"), // Centos, Redhat, SuSE
++        ba("/usr/share/ssl/"), // Red Hat pre-2004, SuSE
++        ba("/etc/pki/ca-trust/extracted/pem/directory-hash/"), // Red Hat 2021+
+         ba("/usr/local/ssl/"), // Normal OpenSSL Tarball
+         ba("/var/ssl/certs/"), // AIX
+         ba("/usr/local/ssl/certs/"), // Solaris
+diff --git a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp
+index 85b17c9d491..78e62bd6b21 100644
+--- a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp
++++ b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp
+@@ -388,7 +388,8 @@ QList<QSslCertificate> systemCaCertificates()
+     {
+         const QList<QByteArray> directories = QSslSocketPrivate::unixRootCertDirectories();
+         QSet<QString> certFiles = {
+-            QStringLiteral("/etc/pki/tls/certs/ca-bundle.crt"), // Fedora, Mandriva
++            QStringLiteral("/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"), // Red Hat 2013+
++            QStringLiteral("/etc/pki/tls/certs/ca-bundle.crt"), // Red Hat older, Mandriva
+             QStringLiteral("/usr/local/share/certs/ca-root-nss.crt") // FreeBSD's ca_root_nss
+         };
+         static const QStringList nameFilters = {u"*.pem"_s, u"*.crt"_s};
+-- 
+2.49.0
+

diff --git a/qt6-qtbase.spec b/qt6-qtbase.spec
index 0107464..e56e1df 100644
--- a/qt6-qtbase.spec
+++ b/qt6-qtbase.spec
@@ -46,7 +46,7 @@ BuildRequires: pkgconfig(libsystemd)
 Name:    qt6-qtbase
 Summary: Qt6 - QtBase components
 Version: 6.9.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
 Url:     http://qt-project.org/
@@ -95,6 +95,10 @@ Patch56: qtbase-mysql.patch
 # fix FTBFS against libglvnd-1.3.4+
 Patch58: qtbase-libglvnd.patch
 
+# Adjust to https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile
+# https://codereview.qt-project.org/c/qt/qtbase/+/664056
+Patch59: 0001-Update-SSL-trust-store-locations-for-modern-Red-Hat.patch
+
 # upstream patches
 
 # Do not check any files in %%{_qt6_plugindir}/platformthemes/ for requires.
@@ -928,6 +932,9 @@ make check -k ||:
 
 
 %changelog
+* Mon Jul 28 2025 Adam Williamson <awilliam@redhat.com> - 6.9.1-3
+- Adjust for https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile removals
+
 * Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.9.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-08 17:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 17:15 [rpms/qt6-qtbase] epel9: Adjust for https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile removals Adam Williamson

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