summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreply.cpp
diff options
context:
space:
mode:
authorRichard Moore <rich@kde.org>2013-02-10 17:06:34 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 21:37:32 +0100
commit5ebc8d3663df5860f13ec9fe0bf4cce1cb37111b (patch)
tree3f953c8f37728cd6eaf001428fe9c6c54d160c9b /src/network/access/qnetworkreply.cpp
parent7898080ca78ceec15163976390979631fcbd178d (diff)
Add an encrypted() signal to QNetworkAccessManager and QNetworkReply.
Add an encrypted signal to QNAM and QNetworkReply to allow applications to perform additional checks on the certificate chain beyond those done as part of the standard SSL validation. This allows things like certificate change notification to be implemented for QNAM as they can be for QSSLSocket currently. Change-Id: I693e3e6fec8b7040379b7e7f1f819550e6b2617f Reviewed-by: Peter Hartmann <phartmann@rim.com>
Diffstat (limited to 'src/network/access/qnetworkreply.cpp')
-rw-r--r--src/network/access/qnetworkreply.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index fd3b7760cb..dc42adc612 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -195,6 +195,31 @@ QNetworkReplyPrivate::QNetworkReplyPrivate()
*/
/*!
+ \fn void QNetworkReply::encrypted()
+ \since 5.1
+
+ This signal is emitted when an SSL/TLS session has successfully
+ completed the initial handshake. At this point, no user data
+ has been transmitted. The signal can be used to perform
+ additional checks on the certificate chain, for example to
+ notify users when the certificate for a website has changed.
+ If the reply does not match the expected criteria then it should
+ be aborted by calling QNetworkReply::abort() by a slot connected
+ to this signal. The SSL configuration in use can be inspected
+ using the QNetworkReply::sslConfiguration() method.
+
+ Internally, QNetworkAccessManager may open multiple connections
+ to a server, in order to allow it process requests in parallel.
+ These connections may be reused, which means that the encrypted()
+ signal would not be emitted. This means that you are only
+ guaranteed to receive this signal for the first connection to a
+ site in the lifespan of the QNetworkAccessManager.
+
+ \sa QSslSocket::encrypted()
+ \sa QNetworkAccessManager::encrypted()
+*/
+
+/*!
\fn void QNetworkReply::sslErrors(const QList<QSslError> &errors)
This signal is emitted if the SSL/TLS session encountered errors