I have an application that still uses Openssl 1.1.1w. I need to update that to an OpenSsl 3 version. Switching to Qt6 seems like the best way to do that, however due to the nature of the codebase we need to work with Qt 5.15 for a while yet.
According to the follwing forum thread and bugreport, Qt supports Openssl 3 from Qt 5.15.13 onwards.
https://forum.qt.io/topic/136960/does-qt-5-15-support-openssl-3-x/21
https://bugreports.qt.io/browse/QTBUG-107729
I tried replacing the libcrypto-1_1-x64.dll and libssl-1_1-x64.dll in the build dir with their Openssl 3 counterparts. This got the following result:
bool hasSslSupport = QSslSocket::supportsSsl(); // false
QString sslLibVersion = QSslSocket::sslLibraryVersionString(); // "" empty string
QString sslLibBuildVersion = QSslSocket::sslLibraryBuildVersionString(); // "OpenSSL 1.1.1m 14 Dec 2021"
The Openssl 3 libs are not recognized. Did I misunderstand what it means for Qt 5.15 to have support for Openssl? What could I do to make this work?
sslLibraryBuildVersionStringhas to be compatible with OpenSSL version linked in runtimesslLibraryVersionString. So, if yoursslLibraryVersionStringis empty, apparently you didn't link with openssl libraries at all, and you should.