qtsslopensslpyqt5qsslsocket

Build PyQt5 on Windows with OpenSSL support?


I'm trying to build PyQt5 with SSL support but, until now, I have no success at all.

What I have done:

So, my questions are:

  1. Am I doing anything wrong?
  2. 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!


Solution

  • Problem solved!

    1. Download and Install the "Light" version of OpenSSL
    2. Follow the above procedure to Rebuild Qt with OpenSSL support + Install SIP + Install PyQt
    3. Copy ssleay32.dll, libeay32.dll and libssl32.dll to the Qt > mingw > bin folder (C:\Qt\Qt5.3.2\5.3\mingw482_32\bin in my case)

    Now you can see a big True when you do a QSslSocket.supportsSsl() test.