diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2011-11-14 12:33:55 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-16 10:32:10 +0100 |
commit | 4dc390e66fefc850cf84292549285a359e2ad8e6 (patch) | |
tree | dfc39a2b1e83826ad959a48ec9d7345db1ab3383 /src/network/ssl | |
parent | e2628ef943f5787da92e737ce259db0750154ef7 (diff) |
SSL namespace: rename TlsV1 to TlsV1_0
This is a source-incompatible change.
TlsV1 is ambiguous; what is actually meant is TLS version 1.0. There are
also TLS versions 1.1 and 1.2; we might want to add options for these
once OpenSSL supports them (apparently they will be with OpenSSL version
1.0.1).
Change-Id: I940d020b181b5fa528788ef0c3c47e8ef873796a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/network/ssl')
-rw-r--r-- | src/network/ssl/qssl.cpp | 8 | ||||
-rw-r--r-- | src/network/ssl/qssl.h | 5 | ||||
-rw-r--r-- | src/network/ssl/qsslconfiguration.cpp | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket.cpp | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 8 |
5 files changed, 14 insertions, 11 deletions
diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp index be4ca028fb..d0d7584ff1 100644 --- a/src/network/ssl/qssl.cpp +++ b/src/network/ssl/qssl.cpp @@ -103,13 +103,13 @@ QT_BEGIN_NAMESPACE \value SslV3 SSLv3 \value SslV2 SSLv2 - \value TlsV1 TLSv1 + \value TlsV1_0 TLSv1.0 \value UnknownProtocol The cipher's protocol cannot be determined. - \value AnyProtocol The socket understands SSLv2, SSLv3, and TLSv1. This + \value AnyProtocol The socket understands SSLv2, SSLv3, and TLSv1.0. This value is used by QSslSocket only. \value TlsV1SslV3 On the client side, this will send - a TLS 1.0 Client Hello, enabling TLSv1 and SSLv3 connections. - On the server side, this will enable both SSLv3 and TLSv1 connections. + a TLS 1.0 Client Hello, enabling TLSv1_0 and SSLv3 connections. + On the server side, this will enable both SSLv3 and TLSv1_0 connections. \value SecureProtocols The default option, using protocols known to be secure; currently behaves like TlsV1SslV3. diff --git a/src/network/ssl/qssl.h b/src/network/ssl/qssl.h index e6e4e5426d..0793a84671 100644 --- a/src/network/ssl/qssl.h +++ b/src/network/ssl/qssl.h @@ -81,7 +81,10 @@ namespace QSsl { enum SslProtocol { SslV3, SslV2, - TlsV1, // ### Qt 5: rename to TlsV1_0 or so + TlsV1_0, +#if QT_DEPRECATED_SINCE(5,0) + TlsV1 = TlsV1_0, +#endif AnyProtocol, TlsV1SslV3, SecureProtocols, diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index 727130b661..80121efa3d 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -97,7 +97,7 @@ QT_BEGIN_NAMESPACE change the settings in the related SSL connection. You must call setSslConfiguration on a modified QSslConfiguration object to achieve that. The following example illustrates how to change the - protocol to TLSv1 in a QSslSocket object: + protocol to TLSv1_0 in a QSslSocket object: \snippet doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp 0 diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index d3795d0ab5..6017e2f3a9 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -56,7 +56,7 @@ QSslSocket establishes a secure, encrypted TCP connection you can use for transmitting encrypted data. It can operate in both client and server mode, and it supports modern SSL protocols, including - SSLv3 and TLSv1. By default, QSslSocket uses TLSv1, but you can + SSLv3 and TLSv1_0. By default, QSslSocket uses TLSv1_0, but you can change the SSL protocol by calling setProtocol() as long as you do it before the handshake has started. diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 817860e4c7..70893afcde 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -195,7 +195,7 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(SSL_CIPHER *ciph else if (protoString == QLatin1String("SSLv2")) ciph.d->protocol = QSsl::SslV2; else if (protoString == QLatin1String("TLSv1")) - ciph.d->protocol = QSsl::TlsV1; + ciph.d->protocol = QSsl::TlsV1_0; if (descriptionList.at(2).startsWith(QLatin1String("Kx="))) ciph.d->keyExchangeMethod = descriptionList.at(2).mid(3); @@ -236,7 +236,7 @@ bool QSslSocketBackendPrivate::initSslContext() { Q_Q(QSslSocket); - // Create and initialize SSL context. Accept SSLv2, SSLv3 and TLSv1. + // Create and initialize SSL context. Accept SSLv2, SSLv3 and TLSv1_0. bool client = (mode == QSslSocket::SslClientMode); bool reinitialized = false; @@ -254,7 +254,7 @@ init_context: default: ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method()); break; - case QSsl::TlsV1: + case QSsl::TlsV1_0: ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method()); break; } @@ -430,7 +430,7 @@ init_context: #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) if ((configuration.protocol == QSsl::TlsV1SslV3 || - configuration.protocol == QSsl::TlsV1 || + configuration.protocol == QSsl::TlsV1_0 || configuration.protocol == QSsl::SecureProtocols || configuration.protocol == QSsl::AnyProtocol) && client && q_SSLeay() >= 0x00090806fL) { |