summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/http/disk_cache_based_ssl_host_info.cc10
-rw-r--r--net/http/disk_cache_based_ssl_host_info.h8
-rw-r--r--net/socket/ssl_client_socket_pool.cc4
-rw-r--r--net/socket/ssl_host_info.cc6
-rw-r--r--net/socket/ssl_host_info.h4
5 files changed, 19 insertions, 13 deletions
diff --git a/net/http/disk_cache_based_ssl_host_info.cc b/net/http/disk_cache_based_ssl_host_info.cc
index 7021cfb..2b509ca 100644
--- a/net/http/disk_cache_based_ssl_host_info.cc
+++ b/net/http/disk_cache_based_ssl_host_info.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -120,7 +120,7 @@ void DiskCacheBasedSSLHostInfo::DoLoop(int rv) {
rv = DoReadComplete(rv);
break;
case WAIT_FOR_DATA_READY_DONE:
- rv = WaitForDataReadyDone();
+ rv = DoWaitForDataReadyDone();
break;
case CREATE:
rv = DoCreate();
@@ -135,7 +135,7 @@ void DiskCacheBasedSSLHostInfo::DoLoop(int rv) {
rv = DoWriteComplete(rv);
break;
case SET_DONE:
- rv = SetDone();
+ rv = DoSetDone();
break;
default:
rv = OK;
@@ -226,7 +226,7 @@ int DiskCacheBasedSSLHostInfo::DoCreate() {
return backend_->CreateEntry(key(), callback_->entry_pointer(), callback_);
}
-int DiskCacheBasedSSLHostInfo::WaitForDataReadyDone() {
+int DiskCacheBasedSSLHostInfo::DoWaitForDataReadyDone() {
CompletionCallback* callback;
DCHECK(!ready_);
@@ -247,7 +247,7 @@ int DiskCacheBasedSSLHostInfo::WaitForDataReadyDone() {
return OK;
}
-int DiskCacheBasedSSLHostInfo::SetDone() {
+int DiskCacheBasedSSLHostInfo::DoSetDone() {
if (entry_)
entry_->Close();
entry_ = NULL;
diff --git a/net/http/disk_cache_based_ssl_host_info.h b/net/http/disk_cache_based_ssl_host_info.h
index 1df838c..c28d403 100644
--- a/net/http/disk_cache_based_ssl_host_info.h
+++ b/net/http/disk_cache_based_ssl_host_info.h
@@ -93,11 +93,11 @@ class DiskCacheBasedSSLHostInfo : public SSLHostInfo,
int DoWrite();
int DoCreate();
- // WaitForDataReadyDone is the terminal state of the read operation.
- int WaitForDataReadyDone();
+ // DoWaitForDataReadyDone is the terminal state of the read operation.
+ int DoWaitForDataReadyDone();
- // SetDone is the terminal state of the write operation.
- int SetDone();
+ // DoSetDone is the terminal state of the write operation.
+ int DoSetDone();
// IsCallbackPending returns true if we have a pending callback.
bool IsCallbackPending() const;
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index dee34cd..ab6db9b 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -202,8 +202,8 @@ int SSLConnectJob::DoTransportConnect() {
if (dnsrr_resolver_)
ssl_host_info_->StartDnsLookup(dnsrr_resolver_);
- // This starts fetching the SSL host info from the disk cache for Snap
- // Start.
+ // This starts fetching the SSL host info from the disk cache for early
+ // certificate verification and the TLS cached information extension.
ssl_host_info_->Start();
}
diff --git a/net/socket/ssl_host_info.cc b/net/socket/ssl_host_info.cc
index 347dada..d428911 100644
--- a/net/socket/ssl_host_info.cc
+++ b/net/socket/ssl_host_info.cc
@@ -94,16 +94,20 @@ bool SSLHostInfo::ParseInner(const std::string& data) {
state->certs.push_back(der_cert);
}
+ // Ignore obsolete members of the State structure.
std::string throwaway_string;
bool throwaway_bool;
+ // This was state->server_hello.
if (!p.ReadString(&iter, &throwaway_string))
return false;
+ // This was state->npn_valid.
if (!p.ReadBool(&iter, &throwaway_bool))
return false;
if (throwaway_bool) {
int throwaway_int;
+ // These were state->npn_status and state->npn_protocol.
if (!p.ReadInt(&iter, &throwaway_int) ||
!p.ReadString(&iter, &throwaway_string)) {
return false;
@@ -161,6 +165,8 @@ std::string SSLHostInfo::Serialize() const {
return "";
}
+ // Write dummy values for obsolete members of the State structure:
+ // state->server_hello and state->npn_valid.
if (!p.WriteString("") ||
!p.WriteBool(false)) {
return "";
diff --git a/net/socket/ssl_host_info.h b/net/socket/ssl_host_info.h
index b91eb56..1387071 100644
--- a/net/socket/ssl_host_info.h
+++ b/net/socket/ssl_host_info.h
@@ -79,8 +79,8 @@ class SSLHostInfo {
const State& state() const;
State* mutable_state();
- // If |cert_valid()| returns true, then this contains the result of verifying
- // the certificate.
+ // If WaitForCertVerification reports the certificate verification has
+ // completed, then this contains the result of verifying the certificate.
const CertVerifyResult& cert_verify_result() const;
// WaitForCertVerification returns ERR_IO_PENDING if the certificate chain in