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

QSslSocket::setLocalCertificate silently succeeds with invalid paths

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P5: Not important P5: Not important
    • Some future release
    • 5.11.2
    • Network: SSL
    • None
    • All

      The overload of QSslSocket::setLocalCertificate taking a file path will succeed silently in all cases (also applicable to setting a null certificate). Having at least one of the following three things as error reporting is not unreasonable to expect:
      1) The method returns a success status (bool, probably can be added for Qt6).
      2) The method emits a debug warning (qWarning).
      3) The socket emits an SSL error.

      The offending code is here:
      qtbase/src/network/ssl/qsslsocket.cpp

        For Gerrit Dashboard: QTBUG-72015
        # Subject Branch Project Status CR V

            kshegunov Konstantin Shegunov
            kshegunov Konstantin Shegunov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change