Does Windows have to support OpenSSL in order for QT Application with OpenSSL to work?
-
According to the documentation:
"If Qt was configured to link against ICU or OpenSSL, the respective DLL's need to be added to the ... folder, too."
-
@Christian-Ehrlicher Even if I add the dlls in the same folder with .exe, it doesn't work on Windows 10.
-
@pktumedis said in Does Windows have to support OpenSSL in order for QT Application with OpenSSL to work?:
it doesn't work
This is no error description.
Which libraries do you use? You need the ones provided by Qt
-
@Christian-Ehrlicher When I run the application in its directory, QSslSocket::supportsSsl() gives true and QSslSocket::sslLibraryVersionString() gives "OpenSSL 1.1.1k". But when I put it in another directory these are false and empty therefore even if the application runs, OpenSSL related features don't work.
I tried copying dlls from different builds including theQT version but none solved the problem.In addition to that, when I compile the same app on Windows 7 and run the .exe with dlls in the same directory, OpenSSL works. So I guess there is problem with Windows 10 computer.
-
Use ProcessExplorer or a debugger to see which openssl dlls are loaded and copy these to your executable folder.
-
@Christian-Ehrlicher May I ask how can I use a debugger for this purpose?
-
Start your program in a debugger and see what dlls are getting loaded.
-
@Christian-Ehrlicher Somehow one of the shortcuts I created for an older compilation of the app now works with OpenSSL support.(I'm not sure what have caused this) The new ones I create after compiling are in the same situation, they don't work with openssl in different directories.
So I compared the two, the one with OpenSSL support takes its openssl dlls(libssl and libcrypto) from System32 directory. And one other difference for the working one was vcruntime140.dll. I copied these three dlls next to .exe file but nothing changed.
-
@Christian-Ehrlicher Thanks so much for your help, I think I solved the problem. Inside the QT directory, there is plugins directory. And inside it there is tls directory which contains 3 dlls: certonlybackend.dll, opensslbackend.dll and schannelbackend.dll. I copied this tls directory next to .exe, I can deploy with OpenSSL now.