I'm trying to build PyQt5 with SSL support but, until now, I have no success at all.
What I have done:
Rebuild Qt with OpenSSL Support: OK
configure.exe -static -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -platform win32-g++ -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib mingw32-makeInstall SIP: OK
python configure.py -p win32-g++ mingw32-make mingw32-make installInstall PyQt5: OK
python configure.py --spec=win32-g++ mingw32-make mingw32-make installEdit the
configure.pyfile, adding a'printsupport'on QtWebKitWidgets ModuleMetadata:'QtWebKitWidgets': ModuleMetadata(qmake_QT=['webkitwidgets', 'printsupport']),instead of
'QtWebKitWidgets': ModuleMetadata(qmake_QT=['webkitwidgets']),After (or before?) the
mingw32-make, remove the line-strip C:$(INSTALL_ROOT)\Python34\pyuic5.batfrom target
install_pyuic5:
Test: NOT OK
>>> from PyQt5.QtNetwork import QSslSocket >>> QSslSocket.supportsSsl() False
So, my questions are:
- Am I doing anything wrong?
- Is there any other configuration needed?
Why I'm asking that...If everything is "ok", I'm trying to access (with a QWebview) some https URLs and I'm getting lot or SSL erros, such as:
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
Thank you in advance!
Problem solved!
ssleay32.dll,libeay32.dllandlibssl32.dllto the Qt > mingw > bin folder (C:\Qt\Qt5.3.2\5.3\mingw482_32\binin my case)Now you can see a big
Truewhen you do aQSslSocket.supportsSsl()test.