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

Documentation of Qssl::SslProtocol is misleading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.8.4, 5.0.0 RC 1
    • Network: SSL
    • None

      http://qt-project.org/doc/qt-5.0/qtnetwork/qssl.html#SslProtocol-enum states:
      "Describes the protocol of the cipher."

      Ssl::SslProtocol is used for two distinct use cases:

      1. QSslCipher::protocol()
      This one parses the OpenSSL SSL_CIPHER_description. Unfortunately, the documentation on http://www.openssl.org/docs/ssl/SSL_CIPHER_get_name.html is misleading, the information on http://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_CIPHERS -> SSL_CIPHER_get_version(...) is more correct but incomplete: "Returns a string like ``TLSv1/SSLv3'' or ``SSLv2'' which indicates the SSL/TLS protocol version to which cipher belongs (i.e. where it was defined in the specification the first time)."

      SSL_CIPHER_description return one of "SSLv2", "SSLv3" or "TLSv1.2" in the second field (TLS 1.0 and 1.1 did not add any new ciphers), as can be extracted from OpenSSL source code in openssl/ssl/ssl_ciph.c

      2. QSslSocket::setProtocol(...), QSslSocket::protocol()
      Selects the SSL/TLS protocol version used for the handshake and should return the negotiated protocol version.
      Protocol version and and cipher protocol version are only weak coupled, you can e.g. negotiate an SSLv3 cipher using a TLSv1.2 handshake.

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

            shkearns Shane Kearns
            bruns Stefan BrĂ¼ns
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes