summaryrefslogtreecommitdiffstats
path: root/net/socket_stream
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 17:27:15 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 17:27:15 +0000
commit822581d32a6836feae73b96a2ce494a058004423 (patch)
tree925796acd3c3aeaa357378c096c5d9efec31bf36 /net/socket_stream
parentae89b8d559bfa6b3a2c1d404b21386bcc8995472 (diff)
downloadchromium_src-822581d32a6836feae73b96a2ce494a058004423.zip
chromium_src-822581d32a6836feae73b96a2ce494a058004423.tar.gz
chromium_src-822581d32a6836feae73b96a2ce494a058004423.tar.bz2
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
Diffstat (limited to 'net/socket_stream')
-rw-r--r--net/socket_stream/socket_stream.cc6
-rw-r--r--net/socket_stream/socket_stream.h1
2 files changed, 6 insertions, 1 deletions
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<SocketStream> {
State next_state_;
HostResolver* host_resolver_;
+ CertVerifier* cert_verifier_;
HttpAuthHandlerFactory* http_auth_handler_factory_;
ClientSocketFactory* factory_;