From 70d8460fc20dab2e1408b8d27ef5fe7a80ba9dc6 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 27 Mar 2017 15:55:34 +0200 Subject: QNAM: delay SSL initialization It's really unfortunate that even a plain 'http' request results in (Open)SSL initialization; this is apparently done by QSslConfiguration's default constructor and we have several classes including QSslConfiguration as a data-member. There are different problems reported because of this, from crashes (a broken OpenSSL on Windows) to long initialization times, which is not acceptable if no 'https' request was actually executed. This patch-set is replacing data-members of type QSslConfiguration with smart-pointers and delays (Open)SSL initialization. Task-number: QTBUG-59750 Change-Id: Id1d375e689dbd2d134abbb0572a9e804d595110e Reviewed-by: Edward Welbourne Reviewed-by: Timur Pocheptsov --- src/network/access/qhttpthreaddelegate_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network/access/qhttpthreaddelegate_p.h') diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h index 6d1ea11f29..2f6954aa3b 100644 --- a/src/network/access/qhttpthreaddelegate_p.h +++ b/src/network/access/qhttpthreaddelegate_p.h @@ -63,7 +63,7 @@ #include "qhttpnetworkrequest_p.h" #include "qhttpnetworkconnection_p.h" #include -#include "qsslconfiguration.h" +#include #include "private/qnoncontiguousbytedevice_p.h" #include "qnetworkaccessauthenticationmanager_p.h" @@ -88,7 +88,7 @@ public: // incoming bool ssl; #ifndef QT_NO_SSL - QSslConfiguration incomingSslConfiguration; + QScopedPointer incomingSslConfiguration; #endif QHttpNetworkRequest httpRequest; qint64 downloadBufferMaximumSize; -- cgit v1.2.3