Windows deployment with SSL - libraries
-
Good morning,
I've revisited some older code and compiled it first with Qt 14.2, now with 15.0. Last compile that has been deployed was with Qt 5.6. All x86.
Program involves logging in to the web service over https, I used QAuthenticator for that. It works.As per usual process I used windeployqt, then copied OpenSSL libcrypto and libssl dll files. On dev machine, be it run standalone or from Qt (the latter both debug and release) all works just fine.
When I copy the folder to the freshly installed Windows program runs but fails to authenticate. I've checked the firewall and all that, there is connectivity. If I would not know that SSL files are in place I'd say that SSL files are missing but then again, they're not.
What do I miss?
EDIT: I use mingw 8, x86.
Kind regards,
Artur Wawrowski -
@hskoglund It worked!
I read the docs in OpenSSL provided with Qt (file INSTALL, src folder, section "Notes on shared libraries), where it states that:On Windows build with MSVC or using MingW, shared libraries are named libcrypto-1_1.dll and libssl-1_1.dll for 32-bit Windows, libcrypto-1_1-x64.dll and libssl-1_1-x64.dll for 64-bit x86_64 Windows, and libcrypto-1_1-ia64.dll and libssl-1_1-ia64.dll for IA64 Windows. With MSVC, the import libraries are named libcrypto.lib and libssl.lib, while with MingW, they are named libcrypto.dll.a and libssl.dll.a.
Of course, files provided with Qt are build with MSVC which is just odd considering that I installed mingw only. Anyway, instead of going with installation of provided msvc packages (they are in the Qt folder tree, ms redist 2010) I downloaded OpenSLL 1.1.1d (or 1.1.1.4 as the dll description states) precompiled with mingw from official mirror.
Works like a charm.What mislead me was that Qt started to provide OpenSSL binaries as toolkit whereas previously I always downloaded myself. Dumb me thought that toolkit would be oriented towards the build chain / compatible.
Anyway, thank you @hskoglund for the hint.