diff options
Diffstat (limited to 'net/socket/client_socket_factory.cc')
-rw-r--r-- | net/socket/client_socket_factory.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc index 2eb90e5..e8e6f2f 100644 --- a/net/socket/client_socket_factory.cc +++ b/net/socket/client_socket_factory.cc @@ -6,6 +6,7 @@ #include "base/lazy_instance.h" #include "build/build_config.h" +#include "net/base/cert_database.h" #include "net/socket/client_socket_handle.h" #if defined(OS_WIN) #include "net/socket/ssl_client_socket_nss.h" @@ -23,12 +24,27 @@ namespace net { +class X509Certificate; + namespace { bool g_use_system_ssl = false; -class DefaultClientSocketFactory : public ClientSocketFactory { +class DefaultClientSocketFactory : public ClientSocketFactory, + public CertDatabase::Observer { public: + DefaultClientSocketFactory() { + CertDatabase::AddObserver(this); + } + + virtual ~DefaultClientSocketFactory() { + CertDatabase::RemoveObserver(this); + } + + virtual void OnUserCertAdded(X509Certificate* cert) { + ClearSSLSessionCache(); + } + virtual ClientSocket* CreateTCPClientSocket( const AddressList& addresses, NetLog* net_log, |