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-make
Install SIP: OK
python configure.py -p win32-g++ mingw32-make mingw32-make install
Install PyQt5: OK
python configure.py --spec=win32-g++ mingw32-make mingw32-make install
Edit the
configure.py
file, 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.bat
from 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!