QSslSocket::startClientEncryption: TLS initialization failed
-
I've made a deployable application that uses OpenSSL. I installed the OpenSSL 1.1.1j Toolkit using QT's Maintenance Tool, and copied the "libcrypto-1_1-x64.dll" and "libssl-1_1-x64.dll" into the win64 directory of the deployed application.
It works perfectly fine on my computer and several other computers that I've tested with. However, I decided to test it on a freshly made Windows 10 x64 Virtual Machine. When starting the application and connecting I get the following errors:
QSslSocket::startClientEncryption: TLS initialization failed QAbstractSocket::SocketError(20)
Qt Version: 5.15.0
OpenSSL Version: 1.1.1Does anyone know what's going on? The application is quite large, if sample code is needed I'll have to make a smaller sample project...
-
@hskoglund Never mind, you were correct... mostly just wrong version of the MSVC.
The "libcrypto-1_1-x64.dll" and "libssl-1_1-x64.dll" DLL files were built using Microsoft Visual Studio 2010 (I guess), and never updated (unfortunately). So it requires the Visual Studio 2010 Redistributable... Rather than just force users to install this on their PC's, I've included both MSVCR100.dll and MSVCP100.dll in the application folder.
Thanks for the tip!