diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-06-15 14:28:50 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-06-16 17:13:50 +0200 |
commit | 2d2c18effc1f00fb5e3f5e1ee51bf817bbbe53a4 (patch) | |
tree | 0a5f7b07af4ef1bd1448d36d34fd56130f46fa9b /src/network/ssl/qsslsocket.cpp | |
parent | 08699a8273ba5d21f6fcb085314373d172b9b66a (diff) |
QSslSocket: delete deprecated cipher settings API
Change-Id: I439ea567b9a4add3eb205335420810d88b580b20
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/ssl/qsslsocket.cpp')
-rw-r--r-- | src/network/ssl/qsslsocket.cpp | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index e4627eba68..ab1f2b0dc8 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -1377,152 +1377,6 @@ QSslKey QSslSocket::privateKey() const return d->configuration.privateKey; } -#if QT_DEPRECATED_SINCE(5, 5) -/*! - \deprecated - - Use QSslConfiguration::ciphers() instead. - - Returns this socket's current cryptographic cipher suite. This - list is used during the socket's handshake phase for choosing a - session cipher. The returned list of ciphers is ordered by - descending preference. (i.e., the first cipher in the list is the - most preferred cipher). The session cipher will be the first one - in the list that is also supported by the peer. - - By default, the handshake phase can choose any of the ciphers - supported by this system's SSL libraries, which may vary from - system to system. The list of ciphers supported by this system's - SSL libraries is returned by supportedCiphers(). You can restrict - the list of ciphers used for choosing the session cipher for this - socket by calling setCiphers() with a subset of the supported - ciphers. You can revert to using the entire set by calling - setCiphers() with the list returned by supportedCiphers(). - - You can restrict the list of ciphers used for choosing the session - cipher for \e all sockets by calling setDefaultCiphers() with a - subset of the supported ciphers. You can revert to using the - entire set by calling setCiphers() with the list returned by - supportedCiphers(). - - \sa setCiphers(), defaultCiphers(), setDefaultCiphers(), supportedCiphers() -*/ -QList<QSslCipher> QSslSocket::ciphers() const -{ - Q_D(const QSslSocket); - return d->configuration.ciphers; -} - -/*! - \deprecated - - USe QSslConfiguration::setCiphers() instead. - - Sets the cryptographic cipher suite for this socket to \a ciphers, - which must contain a subset of the ciphers in the list returned by - supportedCiphers(). - - Restricting the cipher suite must be done before the handshake - phase, where the session cipher is chosen. - - \sa ciphers(), setDefaultCiphers(), supportedCiphers() -*/ -void QSslSocket::setCiphers(const QList<QSslCipher> &ciphers) -{ - Q_D(QSslSocket); - d->configuration.ciphers = ciphers; -} - -/*! - \deprecated - - Use QSslConfiguration::setCiphers() instead. - - Sets the cryptographic cipher suite for this socket to \a ciphers, which - is a colon-separated list of cipher suite names. The ciphers are listed in - order of preference, starting with the most preferred cipher. For example: - - \snippet code/src_network_ssl_qsslsocket.cpp 4 - - Each cipher name in \a ciphers must be the name of a cipher in the - list returned by supportedCiphers(). Restricting the cipher suite - must be done before the handshake phase, where the session cipher - is chosen. - - \sa ciphers(), setDefaultCiphers(), supportedCiphers() -*/ -void QSslSocket::setCiphers(const QString &ciphers) -{ - Q_D(QSslSocket); - d->configuration.ciphers.clear(); - const auto cipherNames = ciphers.split(QLatin1Char(':'), Qt::SkipEmptyParts); - for (const QString &cipherName : cipherNames) { - QSslCipher cipher(cipherName); - if (!cipher.isNull()) - d->configuration.ciphers << cipher; - } -} - -/*! - \deprecated - - Use QSslConfiguration::setCiphers() on the default QSslConfiguration instead. - - Sets the default cryptographic cipher suite for all sockets in - this application to \a ciphers, which must contain a subset of the - ciphers in the list returned by supportedCiphers(). - - Restricting the default cipher suite only affects SSL sockets - that perform their handshake phase after the default cipher - suite has been changed. - - \sa setCiphers(), defaultCiphers(), supportedCiphers() -*/ -void QSslSocket::setDefaultCiphers(const QList<QSslCipher> &ciphers) -{ - QSslSocketPrivate::setDefaultCiphers(ciphers); -} - -/*! - \deprecated - - Use QSslConfiguration::ciphers() on the default QSslConfiguration instead. - - Returns the default cryptographic cipher suite for all sockets in - this application. This list is used during the socket's handshake - phase when negotiating with the peer to choose a session cipher. - The list is ordered by preference (i.e., the first cipher in the - list is the most preferred cipher). - - By default, the handshake phase can choose any of the ciphers - supported by this system's SSL libraries, which may vary from - system to system. The list of ciphers supported by this system's - SSL libraries is returned by supportedCiphers(). - - \sa supportedCiphers() -*/ -QList<QSslCipher> QSslSocket::defaultCiphers() -{ - return QSslSocketPrivate::defaultCiphers(); -} - -/*! - \deprecated - - Use QSslConfiguration::supportedCiphers() instead. - - Returns the list of cryptographic ciphers supported by this - system. This list is set by the system's SSL libraries and may - vary from system to system. - - \sa defaultCiphers(), ciphers(), setCiphers() -*/ -QList<QSslCipher> QSslSocket::supportedCiphers() -{ - return QSslSocketPrivate::supportedCiphers(); -} -#endif // #if QT_DEPRECATED_SINCE(5, 5) - /*! \deprecated |