Reputation: 31
My Windows program uses the OpenSSL library to receive JSON data over of HTTPS.
In Qt version 5.12.3, the OpenSSL 1.0.2 library was used and with it everything was easy and simple. I just put the files from "c: \ Qt \ Qt5.12.3 \ Tools \ mingw730_64 \ opt \ bin \" (ssleay32.dll, libeay32.dll) into the folder with the executable file of my program and everything worked(for compilation I use MinGW).
Now with Qt 5.14.1 came OpenSSL 1.1.1d and I don’t understand how can I connect it to my program so that QNetworkAccessManager finally began to work. The libraries "ssleay32.dll", "libeay32.dll" version 1.1.1d simply do not exist. I tried to put libcrypto-1_1.dll and libssl-1_1.dll libraries(from c: \ Qt \ Qt5.14.1 \ Tools \ QtCreator \ bin ) to my exe but it did not help.
Yes, they are 32-bit, but I also tried to compile my project as x32.
The code
qDebug () << QSslSocket :: supportsSsl () << QSslSocket :: sslLibraryBuildVersionString () << QSslSocket :: sslLibraryVersionString ();
returns
false "OpenSSL 1.1.1d 10 Sep 2019" ""
So.. Is it possible, for Windows 10, to connect a Qt-project to OpenSSL v1.1.1d - without recompiling Qt and without compiling OpenSSL libraries ??
Upvotes: 1
Views: 2559
Reputation: 619
The precompiled version of Qt that we have is built against a more recent version of OpenSSL than what's shipped as a DLL by the Qt installer itself. While this is ok in my machine, when deployed on a clean Windows 10, it fails to load and the app reports TLS errors. Instead, I got a more recent OpenSSL library set, and that seems to work.
To verify this, since I don't have access to the client's machine, I ran a VM using Hyper-V and the Windows 10 Professional image provided by Microsoft themselves. I saw the problem there, and once I overwrote the libcrypto and libssl DLLs with the more recent ones, the app started working just fine.
Upvotes: 1
Reputation: 1
I encountered the same problem as you. I thought it was a problem with OpenSSL, until I read Qt for Windows - Deployment, I copied vccorlib140.dll and vcruntime140.dll to my program directory, and everything worked fine.
Upvotes: 0