diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-25 20:13:49 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-25 20:13:49 +0000 |
commit | a0dbb411be7d97c21f81106c213dc073b28be642 (patch) | |
tree | d08a9f5926db97306b9d870f0833210d5b8261ec /net | |
parent | 2339fcfff952e8c38b2b527652d2283dd59b77fd (diff) | |
download | chromium_src-a0dbb411be7d97c21f81106c213dc073b28be642.zip chromium_src-a0dbb411be7d97c21f81106c213dc073b28be642.tar.gz chromium_src-a0dbb411be7d97c21f81106c213dc073b28be642.tar.bz2 |
Always enable the STATE_LOAD_SSL_HOST_INFO state to verify the crash fix
for bug 84426.
But we will only use ssl_host_info_->state().certs if the cached info
extension is enabled.
Do not treat an empty ssl_host_info_->state().certs as failure because
it is normal for us to not have the server's certificates if we have
not visited the site before.
R=agl@chromium.org
BUG=84426
TEST=none
Review URL: http://codereview.chromium.org/7741007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/socket/ssl_client_socket_nss.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc index 4fdecc9..fdac805 100644 --- a/net/socket/ssl_client_socket_nss.cc +++ b/net/socket/ssl_client_socket_nss.cc @@ -611,7 +611,7 @@ int SSLClientSocketNSS::Connect(CompletionCallback* callback) { return rv; } - if (ssl_config_.cached_info_enabled && ssl_host_info_.get()) { + if (ssl_host_info_.get()) { GotoState(STATE_LOAD_SSL_HOST_INFO); } else { GotoState(STATE_HANDSHAKE); @@ -1362,7 +1362,7 @@ bool SSLClientSocketNSS::LoadSSLHostInfo() { const SSLHostInfo::State& state(ssl_host_info_->state()); if (state.certs.empty()) - return false; + return true; SECStatus rv; const std::vector<std::string>& certs_in = state.certs; @@ -1391,14 +1391,12 @@ bool SSLClientSocketNSS::LoadSSLHostInfo() { } int SSLClientSocketNSS::DoLoadSSLHostInfo() { - int rv; - EnterFunction(""); - rv = ssl_host_info_->WaitForDataReady(&handshake_io_callback_); + int rv = ssl_host_info_->WaitForDataReady(&handshake_io_callback_); GotoState(STATE_HANDSHAKE); if (rv == OK) { - if (!LoadSSLHostInfo()) + if (ssl_config_.cached_info_enabled && !LoadSSLHostInfo()) LOG(WARNING) << "LoadSSLHostInfo failed: " << host_and_port_.ToString(); } else { DCHECK_EQ(ERR_IO_PENDING, rv); |