OpenSSL Windows support.



  • I installed prebuilt OpenSSL on my windows machine and trying to make my network classes work with ssl, but I am getting QNetworkReply::NetworkError(UnknownNetworkError) "Error creating SSL context ()" "" and QSslSocket::supportsSsl(); returns false
    that is what I have done:

    win32: { #mingw openssl precompiled binaries
        LIBS += "C:\OpenSSL-Win32\lib\libssl.lib"
        LIBS += "C:\OpenSSL-Win32\lib\libcrypto.lib"
        INCLUDEPATH += C:\OpenSSL-Win32\include
    }
    

    lib is loaded because app is running but without ssl suppot. Whatdo i do wrong?


  • Moderators

    That's not how you specify libraries to link to. Should be LIBS += -LC:/OpenSSL-Win32/lib -lssl, but that's irrelevant here. It's Qt that needs to be linked with SSL, not your executable, so all that you posted is unnecessary and does nothing.
    If Qt was built with SSL support all you need to do is place the OpenSSL dlls in the directory of your executable.



  • Copying libcrypto-1_1.dll and libssl-1_1.dll to the same directory where executable belongs to does not make it work.
    Is prebuilt Qt packages from https://download.qt.io/archive/qt/5.9/ built with OpenSSL?



  • @Kofr I run into that a couple of weeks ago, @SGaist could help me than.

    Basically Qt does not yet support openssl 1.1, because of changed apis, try downloading the dlls for 1.0



  • @J.Hilk it works with 1.0.2


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.