QSslSocket: delete deprecated cipher settings API
Change-Id: I439ea567b9a4add3eb205335420810d88b580b20 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
08699a8273
commit
2d2c18effc
@ -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
|
||||
|
||||
|
@ -196,16 +196,6 @@ public:
|
||||
const QByteArray &passPhrase = QByteArray());
|
||||
QSslKey privateKey() const;
|
||||
|
||||
// Cipher settings.
|
||||
#if QT_DEPRECATED_SINCE(5, 5)
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::ciphers()") QList<QSslCipher> ciphers() const;
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::setCiphers()") void setCiphers(const QList<QSslCipher> &ciphers);
|
||||
QT_DEPRECATED void setCiphers(const QString &ciphers);
|
||||
QT_DEPRECATED static void setDefaultCiphers(const QList<QSslCipher> &ciphers);
|
||||
QT_DEPRECATED static QList<QSslCipher> defaultCiphers();
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::supportedCiphers()") static QList<QSslCipher> supportedCiphers();
|
||||
#endif // QT_DEPRECATED_SINCE(5, 5)
|
||||
|
||||
// CA settings.
|
||||
#if QT_DEPRECATED_SINCE(5, 15)
|
||||
QT_DEPRECATED_X("Use QSslConfiguration::addCaCertificate()") void addCaCertificate(const QSslCertificate &certificate);
|
||||
|
Loading…
Reference in New Issue
Block a user