Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1016)

Unified Diff: net/base/x509_certificate.h

Issue 452042: Define X509Certificate::intermediate_ca_certs_ as a std::vector of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Update retain the result comment. Sync to ToT. Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/page_info_window_mac.mm ('k') | net/base/x509_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate.h
===================================================================
--- net/base/x509_certificate.h (revision 34171)
+++ net/base/x509_certificate.h (working copy)
@@ -209,15 +209,19 @@
// now.
bool HasExpired() const;
-#if defined(OS_MACOSX)
- // Adds an untrusted intermediate certificate that may be needed for
- // chain building.
- void AddIntermediateCertificate(SecCertificateRef cert);
+#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 result.
- CFArrayRef GetIntermediateCertificates() { return intermediate_ca_certs_; }
+ // 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 @@
// 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.
« no previous file with comments | « chrome/browser/cocoa/page_info_window_mac.mm ('k') | net/base/x509_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698