QSslSocket: SSL support not available despite OpenSSL DLLs present (Qt 5.2.1, Windows, MinGW)
-
I'm developing a Qt application on Windows using Qt 5.2.1 with MinGW 4.8.0. I need to perform HTTPS requests, but my application fails to detect SSL support.
Here’s what I’ve done:
- I placed
libeay32.dllandssleay32.dll(from OpenSSL 1.0.2u) next to the built.exefile. - I included OpenSSL headers and libraries in my project.
- I verified that
QSslSocket::supportsSsl()returns false, and bothsslLibraryBuildVersionString()andsslLibraryVersionString()return empty strings.
The debug console shows:
Supports SSL: false SSL library version (runtime): "" SSL support available: falseI also encountered runtime errors indicating missing Qt DLLs (
Qt5Core.dll,Qt5Gui.dll,Qt5Widgets.dll).
enter image description hereProject structure:
- Qt 5.2.1 with MinGW
- Windows 10
- MinGW 4.8.0
My question:
What else should I configure or fix to make
QSslSocketrecognize OpenSSL and enable HTTPS support?Is it possible that Qt 5.2.1 was built without OpenSSL support? If so, how can I verify or work around that (e.g., rebuilding Qt or switching to libcurl)?
- I placed
-
Use a debugger and set a breakpoint in qsslsocket_openssl_symbols.cpp/tryToLoadOpenSslWin32Library: https://code.qt.io/cgit/qt/qtbase.git/tree/src/network/ssl/qsslsocket_openssl_symbols.cpp?h=5.3