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. how to download a file from ssl
Forum Updated to NodeBB v4.3 + New Features

how to download a file from ssl

Scheduled Pinned Locked Moved Solved General and Desktop
ssl
16 Posts 4 Posters 4.3k Views 1 Watching
  • 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.
  • raven-worxR raven-worx

    @ARASHz4
    connect to QNetworkAccessManager's sslErrors() signal and check why it is called.

    A Offline
    A Offline
    ARASHz4
    wrote on last edited by ARASHz4
    #5

    @raven-worx i connect sslErrors :

    connect(reply, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT (sslErrors(const QList<QSslError>&)));
    

    but don't call sslErrors
    when i start a download in my app, in application output return this :

    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
    
    the_T 1 Reply Last reply
    0
    • A ARASHz4

      @raven-worx i connect sslErrors :

      connect(reply, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT (sslErrors(const QList<QSslError>&)));
      

      but don't call sslErrors
      when i start a download in my app, in application output return this :

      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
      
      the_T Offline
      the_T Offline
      the_
      wrote on last edited by
      #6

      @ARASHz4
      Do you have the SSL libraries available (globally installed and available in %PATH% or copied into the folder that contains your exe)?

      -- No support in PM --

      A 1 Reply Last reply
      1
      • the_T the_

        @ARASHz4
        Do you have the SSL libraries available (globally installed and available in %PATH% or copied into the folder that contains your exe)?

        A Offline
        A Offline
        ARASHz4
        wrote on last edited by
        #7

        @the_ No

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ARASHz4
          wrote on last edited by
          #8

          in install OpenSSL in my system after i installed this in application output don't return this:

          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
          

          but Still i cant download a file from ssl

          the_T 1 Reply Last reply
          0
          • A ARASHz4

            in install OpenSSL in my system after i installed this in application output don't return this:

            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
            

            but Still i cant download a file from ssl

            the_T Offline
            the_T Offline
            the_
            wrote on last edited by
            #9

            @ARASHz4

            Do you get any errors when you try to download the file?

            -- No support in PM --

            A 1 Reply Last reply
            0
            • the_T the_

              @ARASHz4

              Do you get any errors when you try to download the file?

              A Offline
              A Offline
              ARASHz4
              wrote on last edited by
              #10

              @the_ yes, the error is:

              Host https not found
              
              the_T 1 Reply Last reply
              0
              • A ARASHz4

                @the_ yes, the error is:

                Host https not found
                
                the_T Offline
                the_T Offline
                the_
                wrote on last edited by
                #11

                @ARASHz4

                Maybe you can post some code how you try to download the file?
                Our USB crytall ball is currently not working ;)

                -- No support in PM --

                A 1 Reply Last reply
                0
                • the_T the_

                  @ARASHz4

                  Maybe you can post some code how you try to download the file?
                  Our USB crytall ball is currently not working ;)

                  A Offline
                  A Offline
                  ARASHz4
                  wrote on last edited by
                  #12

                  @the_ this is my project :
                  https://github.com/ARASHz4/Advanced_Downloader

                  the_T 1 Reply Last reply
                  0
                  • A ARASHz4

                    @the_ this is my project :
                    https://github.com/ARASHz4/Advanced_Downloader

                    the_T Offline
                    the_T Offline
                    the_
                    wrote on last edited by
                    #13

                    @ARASHz4

                    Well thanks, but I think you know better where you call which method/function whith which parameters.

                    Its hard to read through a whole project without any documentation

                    -- No support in PM --

                    A 1 Reply Last reply
                    1
                    • the_T the_

                      @ARASHz4

                      Well thanks, but I think you know better where you call which method/function whith which parameters.

                      Its hard to read through a whole project without any documentation

                      A Offline
                      A Offline
                      ARASHz4
                      wrote on last edited by
                      #14

                      @the_ class for download is downloader.cpp & downloader.h

                      the_T 1 Reply Last reply
                      0
                      • A ARASHz4

                        @the_ class for download is downloader.cpp & downloader.h

                        the_T Offline
                        the_T Offline
                        the_
                        wrote on last edited by
                        #15

                        @ARASHz4

                        Digging through your files i found this

                        QUrl Url;
                        
                                if(!DownloadListUrl[currentDownload].contains("http://"))
                                {
                                    Url = "http://" + DownloadListUrl[currentDownload];
                                }
                                else
                                {
                                    Url = DownloadListUrl[currentDownload];
                                }
                        
                                FileDownload = new Downloader(Url, this);
                        

                        This is impossible to work. If you have an URL like "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Fibonacci_spiral.svg.png/120px-Fibonacci_spiral.svg.png"
                        this piece of code does not find http:// in the URL string and will prepend it so it will be "http://https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Fibonacci_spiral.svg.png/120px-Fibonacci_spiral.svg.png" afterwards.

                        -- No support in PM --

                        A 1 Reply Last reply
                        1
                        • the_T the_

                          @ARASHz4

                          Digging through your files i found this

                          QUrl Url;
                          
                                  if(!DownloadListUrl[currentDownload].contains("http://"))
                                  {
                                      Url = "http://" + DownloadListUrl[currentDownload];
                                  }
                                  else
                                  {
                                      Url = DownloadListUrl[currentDownload];
                                  }
                          
                                  FileDownload = new Downloader(Url, this);
                          

                          This is impossible to work. If you have an URL like "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Fibonacci_spiral.svg.png/120px-Fibonacci_spiral.svg.png"
                          this piece of code does not find http:// in the URL string and will prepend it so it will be "http://https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Fibonacci_spiral.svg.png/120px-Fibonacci_spiral.svg.png" afterwards.

                          A Offline
                          A Offline
                          ARASHz4
                          wrote on last edited by
                          #16

                          @the_ I fixed this bug.
                          Thank you.

                          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