diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2011-02-22 09:49:39 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2011-02-23 14:07:05 (GMT) |
commit | 60d972c8a39a691ea5a7afb79138fcd77a529605 (patch) | |
tree | 90d1b67a536d3758a2ce8a92cc7d2f13d03a7d01 /tests/auto/qsslsocket | |
parent | 9741b5c067496e24fbf37395e954003d0803c72e (diff) | |
download | Qt-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.cpp | 3 |
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()); |