summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpthreaddelegate.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-11-07 11:13:12 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-01-23 14:27:25 +0100
commit0192630f55bb62bd7cf3a1dc29c6c0624ca7759c (patch)
tree0f393f763adcc038241f9f1200c4ae99b8fa0a4c /src/network/access/qhttpthreaddelegate.cpp
parentc27e1f498f933406aebc1334482da6761fe6de8c (diff)
QNetworkAccessManager: introduce support for TLS PSK
Expose the same kind of TLS PSK client support we already have set in place for QSslSocket. [ChangeLog][QtNetwork][QNetworkAccessManager] It is now possible to use TLS PSK ciphersuites when using HTTPS (or similar protocols working over SSL). Change-Id: I56a048e9f4f841f886758c781af2867d18538a3e Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/access/qhttpthreaddelegate.cpp')
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index e31f23c18c..c8c7be43fa 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -371,6 +371,8 @@ void QHttpThreadDelegate::startRequest()
#ifndef QT_NO_SSL
connect(httpReply,SIGNAL(encrypted()), this, SLOT(encryptedSlot()));
connect(httpReply,SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrorsSlot(QList<QSslError>)));
+ connect(httpReply,SIGNAL(preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)),
+ this, SLOT(preSharedKeyAuthenticationRequiredSlot(QSslPreSharedKeyAuthenticator*)));
#endif
// In the asynchronous HTTP case we can just forward those signals
@@ -675,6 +677,14 @@ void QHttpThreadDelegate::sslErrorsSlot(const QList<QSslError> &errors)
if (!specificErrors.isEmpty())
httpReply->ignoreSslErrors(specificErrors);
}
+
+void QHttpThreadDelegate::preSharedKeyAuthenticationRequiredSlot(QSslPreSharedKeyAuthenticator *authenticator)
+{
+ if (!httpReply)
+ return;
+
+ emit preSharedKeyAuthenticationRequired(authenticator);
+}
#endif
void QHttpThreadDelegate::synchronousAuthenticationRequiredSlot(const QHttpNetworkRequest &request, QAuthenticator *a)