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

Side by Side Diff: net/cert/x509_certificate.h

Issue 2864133002: Convert iOS to use X509CertificateBytes. (Closed)
Patch Set: static_cast, more unittest Created 3 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « net/cert/cert_verify_proc_mac.cc ('k') | net/cert/x509_certificate_ios.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_CERT_X509_CERTIFICATE_H_ 5 #ifndef NET_CERT_X509_CERTIFICATE_H_
6 #define NET_CERT_X509_CERTIFICATE_H_ 6 #define NET_CERT_X509_CERTIFICATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // Returns true if this object and |other| represent the same certificate. 224 // Returns true if this object and |other| represent the same certificate.
225 bool Equals(const X509Certificate* other) const; 225 bool Equals(const X509Certificate* other) const;
226 226
227 // Returns intermediate certificates added via AddIntermediateCertificate(). 227 // Returns intermediate certificates added via AddIntermediateCertificate().
228 // Ownership follows the "get" rule: it is the caller's responsibility to 228 // Ownership follows the "get" rule: it is the caller's responsibility to
229 // retain the elements of the result. 229 // retain the elements of the result.
230 const OSCertHandles& GetIntermediateCertificates() const { 230 const OSCertHandles& GetIntermediateCertificates() const {
231 return intermediate_ca_certs_; 231 return intermediate_ca_certs_;
232 } 232 }
233 233
234 #if defined(OS_IOS)
235 // Returns a new CFMutableArrayRef containing this certificate and its
236 // intermediate certificates in the form expected by Security.framework
237 // and Keychain Services, or NULL on failure.
238 // The first item in the array will be this certificate, followed by its
239 // intermediates, if any.
240 CFMutableArrayRef CreateOSCertChainForCert() const;
241 #endif
242
243 // Do any of the given issuer names appear in this cert's chain of trust? 234 // Do any of the given issuer names appear in this cert's chain of trust?
244 // |valid_issuers| is a list of DER-encoded X.509 DistinguishedNames. 235 // |valid_issuers| is a list of DER-encoded X.509 DistinguishedNames.
245 bool IsIssuedByEncoded(const std::vector<std::string>& valid_issuers); 236 bool IsIssuedByEncoded(const std::vector<std::string>& valid_issuers);
246 237
247 #if defined(OS_WIN) 238 #if defined(OS_WIN)
248 // Returns a new PCCERT_CONTEXT containing this certificate and its 239 // Returns a new PCCERT_CONTEXT containing this certificate and its
249 // intermediate certificates, or NULL on failure. The returned 240 // intermediate certificates, or NULL on failure. The returned
250 // PCCERT_CONTEXT *MUST NOT* be stored in an X509Certificate, as this will 241 // PCCERT_CONTEXT *MUST NOT* be stored in an X509Certificate, as this will
251 // cause os_cert_handle() to return incorrect results. This function is only 242 // cause os_cert_handle() to return incorrect results. This function is only
252 // necessary if the CERT_CONTEXT.hCertStore member will be accessed or 243 // necessary if the CERT_CONTEXT.hCertStore member will be accessed or
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // Untrusted intermediate certificates associated with this certificate 452 // Untrusted intermediate certificates associated with this certificate
462 // that may be needed for chain building. 453 // that may be needed for chain building.
463 OSCertHandles intermediate_ca_certs_; 454 OSCertHandles intermediate_ca_certs_;
464 455
465 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 456 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
466 }; 457 };
467 458
468 } // namespace net 459 } // namespace net
469 460
470 #endif // NET_CERT_X509_CERTIFICATE_H_ 461 #endif // NET_CERT_X509_CERTIFICATE_H_
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_mac.cc ('k') | net/cert/x509_certificate_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698