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

[macOS] QSslSocket seems to not support QSsl::TlsV1_0OrLater

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.4, 5.10
    • 5.9.2
    • Network: SSL
    • None
    • macOS
    • 55f8d7dfe5589f85b0fa8a0705b1821f69b2cb34 9c765522d1c4f8090b5f5d391b1740fc4bd67664

    Description

      TL;DR: Server-side QSslSocket with protocol set to QSsl::TlsV1_0OrLater failes with handshake while with QSsl::TlsV1_2 works correctly. This issue seems to be macOS only.

       

      I have QSslSocket based HTTPS Web server, where every incomming connection is wrapped into QSslSocket like this:

          QSslSocket *socket = new QSslSocket;
          socket->setProtocol(QSsl::SecureTlsV1_2);
          ...
      
          if (!socket->setSocketDescriptor(socketDescriptor)) {
              ...
          }
      
      
          socket->startServerEncryption();
      

      When I access this server with curl, everythings works correctly. If I change socket protocol to QSsl::TlsV1_0OrLater, the SSL handshake fails emitting error signal with  SslHandshakeFailedError

      Placing breakpoint at QSslSocketBackendPrivate::startHandshake() and doing small debug round-trip I can see that bool QSslSocketBackendPrivate::verifySessionProtocol() const returns false as it imho doesn't handle the QSsl::TlsV*OrLater variants of protocol enum correctly.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            barzto Jan Bartipan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes