ERROR qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_client_callback



  • Hello, I have a problem with QNetworkAccessManager when sending data by post method I get the following error "qt.network.ssl: QSslSocket: can not resolve SSL_set_psk_client_callback" and ends the program, this is my .pro.

    LIBS + = -LC: / OpenSSL-Win32 / lib / MinGW -libcrypto-1_1
    LIBS + = -LC: / OpenSSL-Win32 / lib / MinGW -libssl-1_1

    INCLUDEPATH + = C: / OpenSSL-Win32 / include

    I read that is openssl but I still have not found the joke, I hope someone can help, if served before me, upgrade my computer to Windows 10


  • Lifetime Qt Champion

    Hi,

    The OpenSSL libraries are dynamically loaded at run time (they are not linked) So you need to either modify the PATH environment variable in the "Run" part of the Project panel or copy them in the same folder where your application binary can be found.



  • I really feel silly, I do not understand , I must change this:

    0_1474232788120_upload-35515d49-6402-42df-8de7-69843e90f6bc

    and add this path C: \ OpenSSL -Win32


  • Lifetime Qt Champion

    The upload of images is currently broken. Can you use an image sharing site ?




  • Lifetime Qt Champion

    So yes, that's the one you should modify. Just be sure that the folder contains a set of .dll file built with the same compiler you are using for your application.

    On Windows, you can't mix and match compilers. They are not compatible one with the other.



  • Still does not work, I've added the path of the .dll files OpenSSL and follows me out the same mistake.

    Starting C:\Users\Usuario\Documents\qt-projects\build-aja-Desktop_Qt_5_5_1_MSVC2010_32bit-Profile\release\aja.exe...
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_client_callback
    C:\Users\Usuario\Documents\qt-projects\build-aja-Desktop_Qt_5_5_1_MSVC2010_32bit-Profile\release\aja.exe exited with code 1

    Variable::Variable(QObject *parent) :
        QObject(parent)
    {
        man = new QNetworkAccessManager(this);
        timer = new QTimer(this);
        connect(timer,SIGNAL(timeout()),this,SLOT(enviar()));
        timer->start(250);
    
    
    }
    
    void Variable::enviar()
    {
    
        QNetworkRequest requerimiento(QUrl("http://127.0.0.1:8080/vidas/envio.php"));
        QByteArray postDatos;
        QUrlQuery consulta;
        consulta.addQueryItem("pitch",QString::number(5));
        consulta.addQueryItem("yaw",QString::number(5));
        consulta.addQueryItem("roll",QString::number(5));
        postDatos.append(consulta.toString());
        requerimiento.setHeader(QNetworkRequest::ContentTypeHeader,"application/x-www-form-urlencoded;charset=UTF-8");
        requerimiento.setHeader(QNetworkRequest::ContentLengthHeader,postDatos.length());
    
    
        man->post(requerimiento,postDatos);
    
    }
    

  • Lifetime Qt Champion

    Are your OpenSSL .dlls built with MSVC2010 ?



  • yes :( openssl-1.0.1t-vs2010


  • Lifetime Qt Champion

    Silly question but did you check that it is 32bit ?


Log in to reply
 

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