diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2011-04-14 09:24:05 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2011-04-14 11:35:52 (GMT) |
commit | ba172a10765bb2a5474155675485848cb730e625 (patch) | |
tree | 9565f10ae47cc1e3e4f7fdb97ea619cc269203c1 /src | |
parent | 78d47f520b2c4acdf782d39311063f5d44376913 (diff) | |
download | Qt-ba172a10765bb2a5474155675485848cb730e625.zip Qt-ba172a10765bb2a5474155675485848cb730e625.tar.gz Qt-ba172a10765bb2a5474155675485848cb730e625.tar.bz2 |
HTTP+SSL: use default SSL configuration, and avoid setting it explctly
do not use a null configuration, but a default configuration in
QNetworkRequest by default. In addition, setting an SSL configuration
explicitly will cause the on-demand loading of root certs to be
disabled (because it could be that the user has set the CA certificates
explicitly).
Reviewed-by: Markus Goetz
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qhttpthreaddelegate.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkrequest.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 7a17a7f..8084078 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -267,7 +267,7 @@ void QHttpThreadDelegate::startRequest() #endif #ifndef QT_NO_OPENSSL // Set the QSslConfiguration from this QNetworkRequest. - if (ssl) { + if (ssl && incomingSslConfiguration != QSslConfiguration::defaultConfiguration()) { httpConnection->setSslConfiguration(incomingSslConfiguration); } #endif diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 665ee28..338969a 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -524,7 +524,7 @@ void QNetworkRequest::setAttribute(Attribute code, const QVariant &value) QSslConfiguration QNetworkRequest::sslConfiguration() const { if (!d->sslConfiguration) - d->sslConfiguration = new QSslConfiguration; + d->sslConfiguration = new QSslConfiguration(QSslConfiguration::defaultConfiguration()); return *d->sslConfiguration; } |