OpenSSL Windows support.
-
I installed prebuilt OpenSSL on my windows machine and trying to make my network classes work with ssl, but I am getting
QNetworkReply::NetworkError(UnknownNetworkError) "Error creating SSL context ()" ""
andQSslSocket::supportsSsl();
returnsfalse
that is what I have done:win32: { #mingw openssl precompiled binaries LIBS += "C:\OpenSSL-Win32\lib\libssl.lib" LIBS += "C:\OpenSSL-Win32\lib\libcrypto.lib" INCLUDEPATH += C:\OpenSSL-Win32\include }
lib is loaded because app is running but without ssl suppot. Whatdo i do wrong?
-
That's not how you specify libraries to link to. Should be
LIBS += -LC:/OpenSSL-Win32/lib -lssl
, but that's irrelevant here. It's Qt that needs to be linked with SSL, not your executable, so all that you posted is unnecessary and does nothing.
If Qt was built with SSL support all you need to do is place the OpenSSL dlls in the directory of your executable. -
Copying
libcrypto-1_1.dll
andlibssl-1_1.dll
to the same directory where executable belongs to does not make it work.
Is prebuilt Qt packages from https://download.qt.io/archive/qt/5.9/ built with OpenSSL?