From 840e2dd2f04a32120e2ca450fba6f79b06ca2515 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 20 Nov 2015 11:20:02 +0300 Subject: Make sure SSL configuration is correct in QNetworkReply::encrypted. In some cases, when QNetworkReply::encrypted is emitted, QNetworkReply::sslConfiguration is not yet initialized, in particular certificate chain is empty, which breaks the documented usage of 'encrypted' to perform additional checks on certificate chain. It looks to be caused by the fact that QHttpNetworkReply is originally associated with 0th QHttpNetworkConnectionChannel, and this association is not updated if HTTP pipelining is not used. Therefore, a reply on channel >0 might arrive before reply on channel 0, and then using ssl configuration from channel 0, which not made it through handshake, is not usable. Task-number: QTBUG-49554 Change-Id: Ie5d4b5a0c503d5bdc44761ce8581f6ffe4e3bac2 Reviewed-by: Markus Goetz (Woboq GmbH) --- src/network/access/qhttpnetworkconnection_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/network/access/qhttpnetworkconnection_p.h') diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 9af39d416a..d63e722be1 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -207,6 +207,7 @@ public: void requeueRequest(const HttpMessagePair &pair); // e.g. after pipeline broke bool dequeueRequest(QAbstractSocket *socket); void prepareRequest(HttpMessagePair &request); + void updateChannel(int i, const HttpMessagePair &messagePair); QHttpNetworkRequest predictNextRequest(); void fillPipeline(QAbstractSocket *socket); -- cgit v1.2.3