summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_nss.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 06:22:22 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 06:22:22 +0000
commit4c8346f5c8cb8aee75e24ee52e691bc5870557e2 (patch)
tree8a07f33e774a9afd1ea4c9cfa3f781385a713654 /net/socket/ssl_client_socket_nss.cc
parent79ee65390e6fb5d2cb306e0d3f3092a3b83e0609 (diff)
downloadchromium_src-4c8346f5c8cb8aee75e24ee52e691bc5870557e2.zip
chromium_src-4c8346f5c8cb8aee75e24ee52e691bc5870557e2.tar.gz
chromium_src-4c8346f5c8cb8aee75e24ee52e691bc5870557e2.tar.bz2
SSLClientSocketNSS::ClearSessionCache should initialize
NSS implicitly before calling the NSS function SSL_ClearSessionCache. Remove the stale comment that SSLClientSocketNSS::ClearSessionCache is only for tests. R=mattm@chromium.org BUG=105431 TEST=net_unittests --gtest_filter=SSLClientSocketNSSTest.ClearSessionCache Review URL: http://codereview.chromium.org/8816002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113125 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_nss.cc')
-rw-r--r--net/socket/ssl_client_socket_nss.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index d2991ba..5925a6b 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -483,6 +483,12 @@ SSLClientSocketNSS::~SSLClientSocketNSS() {
// static
void SSLClientSocketNSS::ClearSessionCache() {
+ // Initialize the NSS SSL library in a threadsafe way. This also
+ // initializes the NSS base library.
+ EnsureNSSSSLInit();
+ if (!NSS_IsInitialized())
+ return;
+
SSL_ClearSessionCache();
}