summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket_p.h
diff options
context:
space:
mode:
authorAndreas Kling <andreas.kling@nokia.com>2010-06-28 11:00:56 (GMT)
committerAndreas Kling <andreas.kling@nokia.com>2010-06-28 11:44:20 (GMT)
commit94e7b873ed5c04d4850a9e36970906113f12cd55 (patch)
treefcd541ac3fd2c7a198d410642a58d7101ba7166e /src/network/ssl/qsslsocket_p.h
parent8f3cbe7e844ee49b1e25544d9b90218b00efa548 (diff)
downloadQt-94e7b873ed5c04d4850a9e36970906113f12cd55.zip
Qt-94e7b873ed5c04d4850a9e36970906113f12cd55.tar.gz
Qt-94e7b873ed5c04d4850a9e36970906113f12cd55.tar.bz2
Don't load ciphers and system certificates for QSslSocket::supportsSsl()
Loading these uses about 1 MB of memory and can be be deferred until it's actually needed. Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Diffstat (limited to 'src/network/ssl/qsslsocket_p.h')
-rw-r--r--src/network/ssl/qsslsocket_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index d3c3858..09775bc 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -108,7 +108,8 @@ public:
// that was used for connecting to.
QString verificationPeerName;
- static bool ensureInitialized();
+ static bool supportsSsl();
+ static void ensureInitialized();
static void deinitialize();
static QList<QSslCipher> defaultCiphers();
static QList<QSslCipher> supportedCiphers();
@@ -154,6 +155,13 @@ public:
virtual void disconnectFromHost() = 0;
virtual void disconnected() = 0;
virtual QSslCipher sessionCipher() const = 0;
+
+private:
+ static bool ensureLibraryLoaded();
+ static void ensureCiphersAndCertsLoaded();
+
+ static bool s_libraryLoaded;
+ static bool s_loadedCiphersAndCerts;
};
QT_END_NAMESPACE