summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qsslsocket.cpp')
-rw-r--r--src/network/ssl/qsslsocket.cpp178
1 files changed, 44 insertions, 134 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 513cc51620..07c0cd4bf8 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1166,6 +1166,10 @@ QSslKey QSslSocket::privateKey() const
}
/*!
+ \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
@@ -1197,6 +1201,10 @@ QList<QSslCipher> QSslSocket::ciphers() const
}
/*!
+ \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().
@@ -1213,6 +1221,10 @@ void QSslSocket::setCiphers(const QList<QSslCipher> &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:
@@ -1238,6 +1250,10 @@ void QSslSocket::setCiphers(const QString &ciphers)
}
/*!
+ \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().
@@ -1254,6 +1270,10 @@ void QSslSocket::setDefaultCiphers(const QList<QSslCipher> &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.
@@ -1273,6 +1293,10 @@ QList<QSslCipher> QSslSocket::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.
@@ -1285,120 +1309,6 @@ QList<QSslCipher> QSslSocket::supportedCiphers()
}
/*!
- \since 5.5
-
- Returns this socket's current list of elliptic curves. This
- list is used during the socket's handshake phase for choosing an
- elliptic curve (when using an elliptic curve cipher).
- The returned list of curves is ordered by descending preference
- (i.e., the first curve in the list is the most preferred one).
-
- By default, this list is empty. An empty default list means that the
- handshake phase can choose any of the curves supported by this system's SSL
- libraries (which may vary from system to system). The list of curves
- supported by this system's SSL libraries is returned by
- supportedEllipticCurves().
-
- You can restrict the list of curves used for choosing the session cipher
- for this socket by calling setEllipticCurves() with a subset of the
- supported ciphers. You can revert to using the entire set by calling
- setEllipticCurves() with the list returned by supportedEllipticCurves().
-
- \sa setEllipticCurves(), defaultEllipticCurves(), setDefaultEllipticCurves(), supportedEllipticCurves()
-*/
-QVector<QSslEllipticCurve> QSslSocket::ellipticCurves() const
-{
- Q_D(const QSslSocket);
- return d->configuration.ellipticCurves;
-}
-
-/*!
- \since 5.5
-
- Sets the list of elliptic curves to be used by this socket to \a curves,
- which must contain a subset of the curves in the list returned by
- supportedEllipticCurves().
-
- Restricting the elliptic curves must be done before the handshake
- phase, where the session cipher is chosen.
-
- If an empty list is set, then the handshake phase can choose any of the
- curves supported by this system's SSL libraries (which may vary from system
- to system). The list of curves supported by this system's SSL libraries is
- returned by supportedEllipticCurves().
-
- Use setCipher() in order to disable the usage of elliptic curve ciphers.
-
- \sa ellipticCurves(), setDefaultEllipticCurves(), supportedEllipticCurves()
-*/
-void QSslSocket::setEllipticCurves(const QVector<QSslEllipticCurve> &curves)
-{
- Q_D(QSslSocket);
- d->configuration.ellipticCurves = curves;
-}
-
-/*!
- \since 5.5
-
- Sets the list of elliptic curves to be used by all sockets in this
- application to \a curves, which must contain a subset of the curves in the
- list returned by supportedEllipticCurves().
-
- Restricting the default elliptic curves only affects SSL sockets
- that perform their handshake phase after the default list has been changed.
-
- If an empty list is set, then the handshake phase can choose any of the
- curves supported by this system's SSL libraries (which may vary from system
- to system). The list of curves supported by this system's SSL libraries is
- returned by supportedEllipticCurves().
-
- Use setDefaultCiphers() in order to disable the usage of elliptic curve ciphers.
-
- \sa setEllipticCurves(), defaultEllipticCurves(), supportedEllipticCurves()
-*/
-void QSslSocket::setDefaultEllipticCurves(const QVector<QSslEllipticCurve> &curves)
-{
- QSslSocketPrivate::setDefaultEllipticCurves(curves);
-}
-
-
-/*!
- \since 5.5
-
- Returns the default elliptic curves list 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 curve in the
- list is the most preferred one).
-
- By default, this list is empty. An empty default list means that the
- handshake phase can choose any of the curves supported by this system's SSL
- libraries (which may vary from system to system). The list of curves
- supported by this system's SSL libraries is returned by
- supportedEllipticCurves().
-
- \sa setDefaultEllipticCurves(), supportedEllipticCurves()
-*/
-QVector<QSslEllipticCurve> QSslSocket::defaultEllipticCurves()
-{
- return QSslSocketPrivate::defaultEllipticCurves();
-}
-
-/*!
- \since 5.5
-
- Returns the list of elliptic curves supported by this
- system. This list is set by the system's SSL libraries and may
- vary from system to system.
-
- \sa ellipticCurves(), setEllipticCurves(), defaultEllipticCurves()
-*/
-QVector<QSslEllipticCurve> QSslSocket::supportedEllipticCurves()
-{
- return QSslSocketPrivate::supportedEllipticCurves();
-}
-
-/*!
Searches all files in the \a path for certificates encoded in the
specified \a format and adds them to this socket's CA certificate
database. \a path can be explicit, or it can contain wildcards in
@@ -1456,6 +1366,10 @@ void QSslSocket::addCaCertificates(const QList<QSslCertificate> &certificates)
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::setCaCertificates() instead.
+
Sets this socket's CA certificate database to be \a certificates.
The certificate database must be set prior to the SSL handshake.
The CA certificate database is used by the socket during the
@@ -1475,6 +1389,10 @@ void QSslSocket::setCaCertificates(const QList<QSslCertificate> &certificates)
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::caCertificates() instead.
+
Returns this socket's CA certificate database. The CA certificate
database is used by the socket during the handshake phase to
validate the peer's certificate. It can be moodified prior to the
@@ -1535,6 +1453,10 @@ void QSslSocket::addDefaultCaCertificates(const QList<QSslCertificate> &certific
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::setCaCertificates() on the default QSslConfiguration instead.
+
Sets the default CA certificate database to \a certificates. The
default CA certificate database is originally set to your system's
default CA certificate database. You can override the default CA
@@ -1552,6 +1474,10 @@ void QSslSocket::setDefaultCaCertificates(const QList<QSslCertificate> &certific
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::caCertificates() on the default QSslConfiguration instead.
+
Returns the current default CA certificate database. This database
is originally set to your system's default CA certificate database.
If no system default database is found, an empty database will be
@@ -1572,6 +1498,10 @@ QList<QSslCertificate> QSslSocket::defaultCaCertificates()
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::systemDefaultCaCertificates instead.
+
This function provides the CA certificate database
provided by the operating system. The CA certificate database
returned by this function is used to initialize the database
@@ -2166,16 +2096,6 @@ void QSslSocketPrivate::setDefaultSupportedCiphers(const QList<QSslCipher> &ciph
/*!
\internal
*/
-QVector<QSslEllipticCurve> QSslSocketPrivate::defaultEllipticCurves()
-{
- QSslSocketPrivate::ensureInitialized();
- const QMutexLocker locker(&globalData()->mutex);
- return globalData()->config->ellipticCurves;
-}
-
-/*!
- \internal
-*/
QVector<QSslEllipticCurve> QSslSocketPrivate::supportedEllipticCurves()
{
QSslSocketPrivate::ensureInitialized();
@@ -2186,16 +2106,6 @@ QVector<QSslEllipticCurve> QSslSocketPrivate::supportedEllipticCurves()
/*!
\internal
*/
-void QSslSocketPrivate::setDefaultEllipticCurves(const QVector<QSslEllipticCurve> &curves)
-{
- const QMutexLocker locker(&globalData()->mutex);
- globalData()->config.detach();
- globalData()->config->ellipticCurves = curves;
-}
-
-/*!
- \internal
-*/
void QSslSocketPrivate::setDefaultSupportedEllipticCurves(const QVector<QSslEllipticCurve> &curves)
{
const QMutexLocker locker(&globalData()->mutex);