summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsslsocket
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2011-02-22 09:49:39 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2011-02-23 14:07:05 (GMT)
commit60d972c8a39a691ea5a7afb79138fcd77a529605 (patch)
tree90d1b67a536d3758a2ce8a92cc7d2f13d03a7d01 /tests/auto/qsslsocket
parent9741b5c067496e24fbf37395e954003d0803c72e (diff)
downloadQt-60d972c8a39a691ea5a7afb79138fcd77a529605.zip
Qt-60d972c8a39a691ea5a7afb79138fcd77a529605.tar.gz
Qt-60d972c8a39a691ea5a7afb79138fcd77a529605.tar.bz2
SSL backend: loat root certificates on demand on Unix (excluding Mac)
Previously, on initializing the first QSslSocket, we read all root certificates into memory (~ 150 files). Now, we tell OpenSSL where to find the root certificates, so that they can be loaded on demand (if supported, see 'man c_rehash' for details). Reviewed-by: Markus Goetz Task-number: QTBUG-14016
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index fad2e5f..739f902 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -390,6 +390,9 @@ void tst_QSslSocket::constructing()
QSslConfiguration savedDefault = QSslConfiguration::defaultConfiguration();
// verify that changing the default config doesn't affect this socket
+ // (on Unix, the ca certs might be empty, depending on whether we load
+ // them on demand or not, so set them explicitly)
+ socket.setCaCertificates(QSslSocket::systemCaCertificates());
QSslSocket::setDefaultCaCertificates(QList<QSslCertificate>());
QSslSocket::setDefaultCiphers(QList<QSslCipher>());
QVERIFY(!socket.caCertificates().isEmpty());