From 822581d32a6836feae73b96a2ce494a058004423 Mon Sep 17 00:00:00 2001 From: "wtc@google.com" Date: Thu, 16 Dec 2010 17:27:15 +0000 Subject: Cache certificate verification results in memory. R=agl BUG=63357 TEST=none Review URL: http://codereview.chromium.org/5386001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69414 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket_stream/socket_stream.cc | 6 +++++- net/socket_stream/socket_stream.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'net/socket_stream') diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc index 4075e02..21c8e74 100644 --- a/net/socket_stream/socket_stream.cc +++ b/net/socket_stream/socket_stream.cc @@ -50,6 +50,8 @@ SocketStream::SocketStream(const GURL& url, Delegate* delegate) url_(url), max_pending_send_allowed_(kMaxPendingSendAllowed), next_state_(STATE_NONE), + host_resolver_(NULL), + cert_verifier_(NULL), http_auth_handler_factory_(NULL), factory_(ClientSocketFactory::GetDefaultFactory()), proxy_mode_(kDirectConnection), @@ -119,6 +121,7 @@ void SocketStream::set_context(URLRequestContext* context) { if (context_) { host_resolver_ = context_->host_resolver(); + cert_verifier_ = context_->cert_verifier(); http_auth_handler_factory_ = context_->http_auth_handler_factory(); } } @@ -800,7 +803,8 @@ int SocketStream::DoSSLConnect() { socket_.reset(factory_->CreateSSLClientSocket(socket_.release(), HostPortPair::FromURL(url_), ssl_config_, - NULL /* ssl_host_info */)); + NULL /* ssl_host_info */, + cert_verifier_)); next_state_ = STATE_SSL_CONNECT_COMPLETE; metrics_->OnSSLConnection(); return socket_->Connect(&io_callback_); diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h index e1f2584..f485543 100644 --- a/net/socket_stream/socket_stream.h +++ b/net/socket_stream/socket_stream.h @@ -274,6 +274,7 @@ class SocketStream : public base::RefCountedThreadSafe { State next_state_; HostResolver* host_resolver_; + CertVerifier* cert_verifier_; HttpAuthHandlerFactory* http_auth_handler_factory_; ClientSocketFactory* factory_; -- cgit v1.1