QSslSocket: cannot call unresolved function d2i_DHparams



  • hallo all

    i was trying 2 make a program to get a json file from the webserver using QtNetwork
    everytime i try to connect to the website it gives this error :

    qt.network.ssl: QSslSocket: cannot call unresolved function d2i_DHparams
    qt.network.ssl: QSslSocket: cannot call unresolved function DH_free
    

    so what is the problem ?


  • Qt Champions 2016



  • @mrjj no ok it was my bad i was deleteing the QNetworkAccessManager object normal way , so i used the reply->deleteLater(); and now it's ok , then i add the ( libeay32.lib + ssleay32.lib ) to my project and in .pro file :

    LIBS += -LC:/OpenSSL/lib -llibeay32
    LIBS += -LC:/OpenSSL/lib -lssleay32
    

    and add the .dll files in the build folder and now i got thoes errors:

    qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_client_callback
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_server_callback
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_use_psk_identity_hint
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
    qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_alpn_protos
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_alpn_select_cb
    qt.network.ssl: QSslSocket: cannot resolve SSL_get0_alpn_selected
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
    

  • Qt Champions 2016

    @MrLibya said in QSslSocket: cannot call unresolved function d2i_DHparams:

    C:/OpenSS

    and did you in fact install it to that folder ?
    If yes, are you sure the libs are for your compiler ?
    mingw cant use visual studio and reverse



  • @mrjj i think it's compiled on vs , i will try 2 compile it on mingw


  • Lifetime Qt Champion

    Hi,

    Are you sure you are using OpenSSL dlls that are matching the compiler you are using ?

    By the way, you don't need to link your application to them, you should either copy the .dlls in the same folder as your application or go to the "Run" part of the "Project" panel in Qt Creator and modify the PATH environment variable there. Do NOT do it system wide.



  • ok ty alot , i check again and i was using msvc2013 64bit , so i put the open ssl dll files that compiled with msvc 2013 64bit and it's work now , :)


Log in to reply
 

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