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/benchmarks/network | |
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/benchmarks/network')
-rw-r--r-- | tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp index 6cb62d0..041b61a 100644 --- a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -46,7 +46,7 @@ #include <qsslsocket.h> -// #include "../../../../auto/network-settings.h" +#include "../../../../auto/network-settings.h" //TESTED_CLASS= //TESTED_FILES= @@ -65,6 +65,7 @@ public slots: void init(); void cleanup(); private slots: + void rootCertLoading(); void systemCaCertificates(); }; @@ -89,6 +90,16 @@ void tst_QSslSocket::cleanup() } //---------------------------------------------------------------------------------- + +void tst_QSslSocket::rootCertLoading() +{ + QBENCHMARK_ONCE { + QSslSocket socket; + socket.connectToHostEncrypted(QtNetworkSettings::serverName(), 443); + socket.waitForEncrypted(); + } +} + void tst_QSslSocket::systemCaCertificates() { // The results of this test change if the benchmarking system changes too much. |