Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-13357

QSslConfiguration::setDefaultConfiguration() does not set new ssl configuration for future QNetworkRequest s

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.6.3, 4.7.0
    • Core: I/O, Network, Network: SSL
    • None

    Description

      How to reproduce (pseudocode):

      1. QNetworkAccessManager d
      2.  /* set default configuration without certificates at all */
           QSslConfiguration::setDefaultConfiguration(QSslConfiguration::defaultConfiguration().setCaCertificates(QList<QSslCertificate>))
      3. d.get(QNetworkRequest("https://evil.com"))
      4.  ( as, the CaCerts are emty, we will go to QNetworkAccessManager::sslErrors signal connected with our slot  in which we will add certificate)
      5. in slot:  
         QSslConfiguration sc= QSslConfiguration::defaultConfiguration();
         sc.setCaCertificates(QList<QSslCertificate>() << reply->sslConfiguration()->peerCertificateChain().last() ) ;
         QSslConfiguration::setDefaultConfiguration(sc);
         /* slot complete */
      6. QNetworkRequest * xxx=QNetworkRequest("https://evil2.com");
      7. xxx->sslConfiguration().caCertificates().size()  will be 0 !!! but should not !!!
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              phartman Peter Hartmann (closed Nokia identity) (Inactive)
              socketpair@gmail.com Коренберг Марк
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes