SSL not supported after migration from Qt 5 to Qt 6.2.4
-
Hello,
I'm currently migrating our Qt 5.15 project to Qt 6.2.4. It's a linux application which is currently running on Ubuntu 22.04.1.
The program is built on a Ubuntu 22.04.1 buildserver using pbuilder, debhelper and qmake, in a quite sophisticated procedure. But also just using qmake and make, without all the pbuilder and debhelper stuff, I have the same problem:The Qt 5.15 build works fine:
Output:I 2024.05.23 12:28:13.327 | Application: Device supports OpenSSL: true I 2024.05.23 12:28:13.327 | Application: OpenSSL lib: "OpenSSL 3.0.2 15 Mar 2022" I 2024.05.23 12:28:13.328 | Application: OpenSSL lib build: "OpenSSL 3.0.2 15 Mar 2022"
for:
qCDebug(dcApplication) << "Device supports OpenSSL: " << QSslSocket::supportsSsl(); qCDebug(dcApplication) << "OpenSSL lib:" << QSslSocket::sslLibraryVersionString(); qCDebug(dcApplication) << "OpenSSL lib build:" << QSslSocket::sslLibraryBuildVersionString();
The Qt 6.2.4 build has issues:
W 2024.05.23 12:30:10.068 | qt.network.ssl: No functional TLS backend was found I 2024.05.23 12:30:10.068 | Application: Device supports OpenSSL: false W 2024.05.23 12:30:10.068 | qt.network.ssl: No functional TLS backend was found I 2024.05.23 12:30:10.068 | Application: OpenSSL lib: "" W 2024.05.23 12:30:10.068 | qt.network.ssl: No functional TLS backend was found I 2024.05.23 12:30:10.068 | Application: OpenSSL lib build: "" W 2024.05.23 12:30:10.069 | qt.network.ssl: No functional TLS backend was found I 2024.05.23 12:30:10.069 | Application: OpenSSL lib build nbr: -1 I 2024.05.23 12:30:10.069 | Application: OpenSSL supported Protocols: QList() I 2024.05.23 12:30:10.069 | Application: OpenSSL available backends: QList()
for
qCDebug(dcApplication) << "Device supports OpenSSL: " << QSslSocket::supportsSsl(); qCDebug(dcApplication) << "OpenSSL lib:" << QSslSocket::sslLibraryVersionString(); qCDebug(dcApplication) << "OpenSSL lib build:" << QSslSocket::sslLibraryBuildVersionString(); qCDebug(dcApplication) << "OpenSSL lib build nbr:" << QSslSocket::sslLibraryBuildVersionNumber(); qCDebug(dcApplication) << "OpenSSL supported Protocols:" << QSslSocket::supportedProtocols(); qCDebug(dcApplication) << "OpenSSL available backends:" << QSslSocket::availableBackends();
I've tried building the application with Qt from the official Ubuntu repository ( qt6-base-dev (6.2.4+dfsg-2ubuntu1), etc. )
and from the Qt Online Installer, but both have the same issue.Because of the outputs of supportsSsl(), sslLibraryBuildVersionString() and sslLibraryBuildVersionNumber(), it seems, that the used Qt builds are configured with the -no-openssl option (https://doc.qt.io/qt-6.2/ssl.html), or may there be a a different issue? Is it really the case, that I have to build Qt by myself with the -openssl-linked option (which I'm currently trying) and all these prebuilt Qt versions are without SSL support? Or is there something I'm missing when migrating from Qt 5 to Qt 6 concerning openssl?
Thanks in advance!
-
Hi,
@fabian_obe said in SSL not supported after migration from Qt 5 to Qt 6.2.4:
I'm currently migrating our Qt 5.15 project to Qt 6.2.4
why 6.2.4 specifically?
If I remember correctly there were some issues/changes in earlier Qt6 releases regarding OpenSSL and some other modules.
Yup, a quick search brought up the following:
These topics here and here look like the same issue
Don't have the right solution at hand to fix your issue. Might be a bug, might need some additional configuration, but other reports show that later releases (6.3+) seem to work "just like that".