Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNetworkAccessManager get method gives ssl error

QNetworkAccessManager get method gives ssl error

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bozo
    wrote on last edited by bozo
    #1

    Hello, I'm trying to follow the suggestion from the following thread:
    https://forum.qt.io/topic/88097/downloading-file-from-ftp-server/13

    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 "qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method ,
    qt.network.ssl: 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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • B Offline
        B Offline
        bozo
        wrote on last edited by
        #3

        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();
        

        Result:

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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 ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          B 1 Reply Last reply
          0
          • SGaistS SGaist

            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 ?

            B Offline
            B Offline
            bozo
            wrote on last edited by bozo
            #5

            @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

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

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

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              B 1 Reply Last reply
              0
              • SGaistS SGaist

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

                B Offline
                B Offline
                bozo
                wrote on last edited by
                #7

                @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.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Where did that kit come from ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bozo
                    wrote on last edited by
                    #9

                    It was preinstalled in the development vm.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

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

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved