diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 02:14:01 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 02:14:01 +0000 |
commit | 3d5c1bdce6865b3e02cc58f0a8083eb1cbb77b47 (patch) | |
tree | 1fcf95c5bb0b231cb97f7ef10e7078e0b4423be1 /net/http | |
parent | 492f1c3f1296aecc8a1a33e341094e922d6d2ba5 (diff) | |
download | chromium_src-3d5c1bdce6865b3e02cc58f0a8083eb1cbb77b47.zip chromium_src-3d5c1bdce6865b3e02cc58f0a8083eb1cbb77b47.tar.gz chromium_src-3d5c1bdce6865b3e02cc58f0a8083eb1cbb77b47.tar.bz2 |
Don't use X509Certificate in SSLConfig.
X509Certificate class depends in OS-dependant APIs and hense cannot
be created inside of sandbox. This change allows specifying
allow_bed_certs when running inside of sandbox.
BUG=80587
TEST=Unittests
Review URL: http://codereview.chromium.org/7401003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_stream_factory_impl_job.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc index 417857b..dcbf114 100644 --- a/net/http/http_stream_factory_impl_job.cc +++ b/net/http/http_stream_factory_impl_job.cc @@ -1013,7 +1013,13 @@ int HttpStreamFactoryImpl::Job::HandleCertificateError(int error) { // RestartIgnoringLastError(). And the user will be asked interactively // before RestartIgnoringLastError() is ever called. SSLConfig::CertAndStatus bad_cert; - bad_cert.cert = ssl_info_.cert; + + // |ssl_info_.cert| may be NULL if we failed to create + // X509Certificate for whatever reason, but normally it shouldn't + // happen, unless this code is used inside sandbox. + if (ssl_info_.cert == NULL || + !ssl_info_.cert->GetDEREncoded(&bad_cert.der_cert)) + return error; bad_cert.cert_status = ssl_info_.cert_status; ssl_config_.allowed_bad_certs.push_back(bad_cert); |