summaryrefslogtreecommitdiffstats
path: root/net/base/x509_certificate.h
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 19:35:54 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 19:35:54 +0000
commiteef15aa68c1ead785af67f8e4aaf8fcdb7ed6c04 (patch)
tree63fbe28673d68bdf64a66c881ddad6c827dc8b8f /net/base/x509_certificate.h
parent32a4eeb62d7eb1d4e8178eabbc5ffa3bd651d7cb (diff)
downloadchromium_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.h')
-rw-r--r--net/base/x509_certificate.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index 2628dbb..b83bd8a 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -209,15 +209,19 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
// now.
bool HasExpired() const;
-#if defined(OS_MACOSX)
- // Adds an untrusted intermediate certificate that may be needed for
- // chain building.
- void AddIntermediateCertificate(SecCertificateRef cert);
-
- // Returns intermediate certificates added via AddIntermediateCertificate().
- // Ownership follows the "get" rule: it is the caller's responsibility to
- // retain the result.
- CFArrayRef GetIntermediateCertificates() { return intermediate_ca_certs_; }
+#if defined(OS_MACOSX) || defined(OS_WIN)
+ // Adds an untrusted intermediate certificate that may be needed for
+ // chain building.
+ void AddIntermediateCertificate(OSCertHandle cert) {
+ intermediate_ca_certs_.push_back(cert);
+ }
+
+ // Returns intermediate certificates added via AddIntermediateCertificate().
+ // Ownership follows the "get" rule: it is the caller's responsibility to
+ // retain the elements of the result.
+ const std::vector<OSCertHandle>& GetIntermediateCertificates() const {
+ return intermediate_ca_certs_;
+ }
#endif
// Verifies the certificate against the given hostname. Returns OK if
@@ -310,10 +314,10 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
// A handle to the certificate object in the underlying crypto library.
OSCertHandle cert_handle_;
-#if defined(OS_MACOSX)
- // Untrusted intermediate certificates associated with this certificate
- // that may be needed for chain building.
- CFMutableArrayRef intermediate_ca_certs_;
+#if defined(OS_MACOSX) || defined(OS_WIN)
+ // Untrusted intermediate certificates associated with this certificate
+ // that may be needed for chain building.
+ std::vector<OSCertHandle> intermediate_ca_certs_;
#endif
// Where the certificate comes from.