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 /src/network/ssl/qsslsocket_openssl_symbols.cpp | |
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 'src/network/ssl/qsslsocket_openssl_symbols.cpp')
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index 38598b6..b9a05f3 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -262,6 +262,7 @@ DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c, #endif DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG) DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG) +DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return) #ifdef Q_OS_SYMBIAN #define RESOLVEFUNC(func, ordinal, lib) \ @@ -630,6 +631,7 @@ bool q_resolveOpenSslSymbols() #endif RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf, 1153, libs.second ) RESOLVEFUNC(OPENSSL_add_all_algorithms_conf, 1152, libs.second ) + RESOLVEFUNC(SSL_CTX_load_verify_locations, 34, libs.second ) #else // Q_OS_SYMBIAN #ifdef SSLEAY_MACROS RESOLVEFUNC(ASN1_dup) @@ -754,6 +756,7 @@ bool q_resolveOpenSslSymbols() #endif RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf) RESOLVEFUNC(OPENSSL_add_all_algorithms_conf) + RESOLVEFUNC(SSL_CTX_load_verify_locations) #endif // Q_OS_SYMBIAN symbolsResolved = true; delete libs.first; |