diff options
author | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-21 06:13:46 +0000 |
---|---|---|
committer | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-21 06:13:46 +0000 |
commit | faff9856acc3c72ac4f5ccd4a1ab6ccd2b5c8f1e (patch) | |
tree | 496182fd4c1db405452b8e6f874df409b0131f91 /net/ssl | |
parent | bf25283f100a20533ad0d235265d35b54a497455 (diff) | |
download | chromium_src-faff9856acc3c72ac4f5ccd4a1ab6ccd2b5c8f1e.zip chromium_src-faff9856acc3c72ac4f5ccd4a1ab6ccd2b5c8f1e.tar.gz chromium_src-faff9856acc3c72ac4f5ccd4a1ab6ccd2b5c8f1e.tar.bz2 |
Fix SSLClientSocketOpenSSL error-handling for Channel ID.
The old logic did not propogate asynchronous errors forward and potentially may
trigger two GetOrCreateDomainBoundCert calls in parallel if DoHandshake were
called while a Channel ID request were in flight.
Add a test to ensure this case behaves as expected.
BUG=386276
Review URL: https://codereview.chromium.org/338093012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ssl')
-rw-r--r-- | net/ssl/server_bound_cert_service.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ssl/server_bound_cert_service.cc b/net/ssl/server_bound_cert_service.cc index 61d610b..b6b67c2 100644 --- a/net/ssl/server_bound_cert_service.cc +++ b/net/ssl/server_bound_cert_service.cc @@ -516,9 +516,10 @@ void ServerBoundCertService::GotServerBoundCert( HandleResult(OK, server_identifier, key, cert); return; } - // Async lookup did not find a valid cert. If no request asked to create one, - // return the error directly. - if (!j->second->CreateIfMissing()) { + // Async lookup failed or the certificate was missing. Return the error + // directly, unless the certificate was missing and a request asked to create + // one. + if (err != ERR_FILE_NOT_FOUND || !j->second->CreateIfMissing()) { HandleResult(err, server_identifier, key, cert); return; } |