"qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed" even though SSL is installed
-
This post is deleted!
-
Hi, one other thing you can try is to build and run the "Secure Socket Client Example" in Qt's examples. (it's included both in Qt 5.14 and 5.15.) Make sure you run in it Release mode (not Debug).
If that example works, then maybe you can copy the files from it... -
@keksi-venksi Here it is, since you are using Qt5.15.2, according to the Qt source code (https://code.qt.io/cgit/qt/qtbase.git/tree/src/network/ssl/qsslsocket_openssl_symbols.cpp?h=v5.15.2#n683)
tryToLoadOpenSslWin32Library(QLatin1String("libssl-1_1" QT_SSL_SUFFIX), QLatin1String("libcrypto-1_1" QT_SSL_SUFFIX), result);
It will only find v1.1.x of openssl.
-
@hskoglund said in "qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed" even though SSL is installed:
Secure Socket Client Example
That example itself not working in my qt 5.14.2
-
@Bonnie said in "qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed" even though SSL is installed:
tryToLoadOpenSslWin32Library
how to call this method.
its present in a private class
Please show some code to execute it
-
@keksi-venksi This is Qt's internal source code, you are not supposed to use it. I post it to show that it is hard coded to load openssl v1.1.x only.
-
@keksi-venksi why did you install OpenSSL v3 since you need v1.1 ?
-
@keksi-venksi you need to download openssl 1.1.1 on windows.
When done , copy libssl-1_1-x64.dll and libcrypto-1_1-x64.dll in your qt installation folder, mine is
C:\Qt\Qt5.13.2\5.13.2\mingw73_64\bin
After that it will work