Important: Please read the Qt Code of Conduct -

QNetworkAccessManager get method gives ssl error

  • Hello, I'm trying to follow the suggestion from the following thread:

    The goal is to download a file from a ftp-server via QNetworkAccessManager.
    When calling get like in the following line i get the error " QSslSocket: cannot resolve SSLv3_client_method , QSslSocket: cannot resolve SSLv3_server_method".

    QNetworkReply* const repl = netMan.get(QNetworkRequest(QUrl::fromUserInput(R"**(*myFtpServerIp\file.txt)**")));

    The application does not send the get-request, checked with wireshark.
    Im on debian 9 using Qt 5.12.3
    Any help would be appreciated.

    EDIT: I put the code directly in the main and it works now. Before I was calling it in an object which was created in the main.

  • Lifetime Qt Champion


    What version of OpenSSL do you have installed ?

    IIRC, there was a switch from 1.0 to 1.1 at some point so it's worth updating Qt to at least the latest current LTS which is 5.12.6.

  • This are the installed ssl versions:

    libssl1.0-dev/oldstable,now 1.0.2u-1~deb9u1 amd64 [installed]
    libssl1.0.2/oldstable,now 1.0.2u-1~deb9u1 amd64 [installed]
    libssl1.1/oldstable,now 1.1.0k-1~deb9u1 amd64 [installed,upgradable to: 1.1.0l-1~deb9u1]
    openssl/oldstable,now 1.1.0k-1~deb9u1 amd64 [installed,upgradable to: 1.1.0l-1~deb9u1]

    Running the following code to get some more information:

    qDebug()<<"SSL version use for build: "<<QSslSocket::sslLibraryBuildVersionString();
    qDebug()<<"SSL version use for run-time: "<<QSslSocket::sslLibraryVersionNumber();


    SSL version use for build:  "OpenSSL 1.0.2k-fips  26 Jan 2017"
    SSL version use for run-time:  268443999

    Upgrading to 5.12.6 is not that simple because I would also need a new toolchain to crosscompile for an imx6 device. I do have an imx6 device image with 5.12.6 installed but dont have a toolchain setup on my dev machine.

  • Lifetime Qt Champion

    Since you marked the thread as solved, did you succeed ?

    As for the move to 5.12.6, why would a new toolchain be needed ?

  • @SGaist After putting the example code from the linked thread into the main instead of an object I was able to upload and download files with ftp. The ssl messages still remain.
    Regarding 5.12.6: Im using a preconfigured debian vm and dont know how to compile the qt version

  • Lifetime Qt Champion

    Can you explain exactly how you are doing currently to build your application for your target ?

  • @SGaist I'm using qt-creator 4.9.0. There is a kit configured to build the application on my dev machine then upload and run the application on my device via ssh. It includes a sysroot of the device and a qt-version 5.12.3 (debian-stretch-armhf-eglfb_imx_viv_x86-64). The compiler used for C/C++ is GCC arm 32bit.

  • Lifetime Qt Champion

    Where did that kit come from ?

  • It was preinstalled in the development vm.

  • Lifetime Qt Champion

    Don't they provide documentation on how to re-build it ?

Log in to reply