summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 03:15:29 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 03:15:29 +0000
commit5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e (patch)
tree7666e5405e74387c72715b12cde0292dc7bb0953 /net/http
parent6e2ab656dcf1ecfbdf52b588ad7f9b212af0551d (diff)
downloadchromium_src-5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e.zip
chromium_src-5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e.tar.gz
chromium_src-5bdf2b4b687c33bb83ed28bab6ed35da20a4d50e.tar.bz2
Make X509Certificate::GetDEREncoded a static function taking an OSCertHandle
Rather than require an X509Certificate*, which has additional processing overhead, make X509Certificate::GetDEREncoded a static function which takes an OSCertHandle. Callers which already have an X509Certificate* can easily use ->os_cert_handle(), while those that have an OSCertHandle, such as by way of GetIntermediateCertificates(), can use the OSCertHandle directly. BUG=91464 TEST=none Review URL: http://codereview.chromium.org/8414047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_stream_factory_impl_job.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 66c3135..17cd769 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -1074,8 +1074,10 @@ int HttpStreamFactoryImpl::Job::HandleCertificateError(int error) {
// 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))
+ !X509Certificate::GetDEREncoded(ssl_info_.cert->os_cert_handle(),
+ &bad_cert.der_cert)) {
return error;
+ }
bad_cert.cert_status = ssl_info_.cert_status;
server_ssl_config_.allowed_bad_certs.push_back(bad_cert);