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

Qt should load system CA certificates on-demand

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P4: Low
    • 4.8.0
    • 4.7.0
    • Network: SSL
    • None
    • 60d972c8a39a691ea5a7afb79138fcd77a529605

    Description

      It's possible to hook into the OpenSSL handshake process and obtain the identification of the root CA certificate being requested, and only then load it from the system CA certificate store.

      I'm not sure which API can do this in OpenSSL, but on Unix an strace of the /usr/bin/openssl tool (when passed the -CApath argument) reveals that it does load certs on-demand. E.g.:

      $ strace -e open openssl s_client -connect bugs.kde.org:443 -CApath /etc/ssl/certs/ 2>&1 | grep etc/ssl/certs
      open("/etc/ssl/certs//bcdd5959.0", O_RDONLY|O_LARGEFILE) = 4
      

      The full loading of CA certificates should only be triggered if the user tries to obtain the list, via QSslConfiguration::defaultConfiguration().caCertificates() or QSslSocket::defaultCaCertificates(). In other words, we should keep a flag indicating whether on-demand loading has been done.

      Note: on-demand loading must not break thread-safety.

      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)
              tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes