diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 19:35:54 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 19:35:54 +0000 |
commit | eef15aa68c1ead785af67f8e4aaf8fcdb7ed6c04 (patch) | |
tree | 63fbe28673d68bdf64a66c881ddad6c827dc8b8f /net/base/x509_certificate.cc | |
parent | 32a4eeb62d7eb1d4e8178eabbc5ffa3bd651d7cb (diff) | |
download | chromium_src-eef15aa68c1ead785af67f8e4aaf8fcdb7ed6c04.zip chromium_src-eef15aa68c1ead785af67f8e4aaf8fcdb7ed6c04.tar.gz chromium_src-eef15aa68c1ead785af67f8e4aaf8fcdb7ed6c04.tar.bz2 |
Define X509Certificate::intermediate_ca_certs_ as a std::vector of
OSCertHandle so that we can also use it on Windows.
Remove the unused SSLClientSocketMac::intermediate_certs_ member.
R=hawk
BUG=28744
TEST=Can visit good HTTPS sites with no certificate errors. Clicking
the "Certificate information" button in the page security information
window should show a complete certificate chain (as opposed to just
the server certificate).
Review URL: http://codereview.chromium.org/452042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate.cc')
-rw-r--r-- | net/base/x509_certificate.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc index e8db7c7..24388d8 100644 --- a/net/base/x509_certificate.cc +++ b/net/base/x509_certificate.cc @@ -170,9 +170,6 @@ X509Certificate* X509Certificate::CreateFromBytes(const char* data, X509Certificate::X509Certificate(OSCertHandle cert_handle, Source source) : cert_handle_(cert_handle), -#if defined(OS_MACOSX) - intermediate_ca_certs_(NULL), -#endif source_(source) { Initialize(); } @@ -186,9 +183,6 @@ X509Certificate::X509Certificate(const std::string& subject, valid_start_(start_date), valid_expiry_(expiration_date), cert_handle_(NULL), -#if defined(OS_MACOSX) - intermediate_ca_certs_(NULL), -#endif source_(SOURCE_UNUSED) { memset(fingerprint_.data, 0, sizeof(fingerprint_.data)); } @@ -198,9 +192,9 @@ X509Certificate::~X509Certificate() { X509Certificate::Cache::GetInstance()->Remove(this); if (cert_handle_) FreeOSCertHandle(cert_handle_); -#if defined(OS_MACOSX) - if (intermediate_ca_certs_) - CFRelease(intermediate_ca_certs_); +#if defined(OS_MACOSX) || defined(OS_WIN) + for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) + FreeOSCertHandle(intermediate_ca_certs_[i]); #endif } |