| OLD | NEW |
| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 bool Equals(const X509Certificate* other) const; | 209 bool Equals(const X509Certificate* other) const; |
| 210 | 210 |
| 211 // Returns intermediate certificates added via AddIntermediateCertificate(). | 211 // Returns intermediate certificates added via AddIntermediateCertificate(). |
| 212 // Ownership follows the "get" rule: it is the caller's responsibility to | 212 // Ownership follows the "get" rule: it is the caller's responsibility to |
| 213 // retain the elements of the result. | 213 // retain the elements of the result. |
| 214 const OSCertHandles& GetIntermediateCertificates() const { | 214 const OSCertHandles& GetIntermediateCertificates() const { |
| 215 return intermediate_ca_certs_; | 215 return intermediate_ca_certs_; |
| 216 } | 216 } |
| 217 | 217 |
| 218 #if defined(OS_MACOSX) | 218 #if defined(OS_MACOSX) |
| 219 // Does this certificate's usage allow SSL client authentication? | |
| 220 bool SupportsSSLClientAuth() const; | |
| 221 | |
| 222 // Returns a new CFMutableArrayRef containing this certificate and its | 219 // Returns a new CFMutableArrayRef containing this certificate and its |
| 223 // intermediate certificates in the form expected by Security.framework | 220 // intermediate certificates in the form expected by Security.framework |
| 224 // and Keychain Services, or NULL on failure. | 221 // and Keychain Services, or NULL on failure. |
| 225 // The first item in the array will be this certificate, followed by its | 222 // The first item in the array will be this certificate, followed by its |
| 226 // intermediates, if any. | 223 // intermediates, if any. |
| 227 CFMutableArrayRef CreateOSCertChainForCert() const; | 224 CFMutableArrayRef CreateOSCertChainForCert() const; |
| 228 #endif | 225 #endif |
| 229 | 226 |
| 230 // Do any of the given issuer names appear in this cert's chain of trust? | 227 // Do any of the given issuer names appear in this cert's chain of trust? |
| 231 // |valid_issuers| is a list of DER-encoded X.509 DistinguishedNames. | 228 // |valid_issuers| is a list of DER-encoded X.509 DistinguishedNames. |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 // Untrusted intermediate certificates associated with this certificate | 445 // Untrusted intermediate certificates associated with this certificate |
| 449 // that may be needed for chain building. | 446 // that may be needed for chain building. |
| 450 OSCertHandles intermediate_ca_certs_; | 447 OSCertHandles intermediate_ca_certs_; |
| 451 | 448 |
| 452 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 449 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 453 }; | 450 }; |
| 454 | 451 |
| 455 } // namespace net | 452 } // namespace net |
| 456 | 453 |
| 457 #endif // NET_CERT_X509_CERTIFICATE_H_ | 454 #endif // NET_CERT_X509_CERTIFICATE_H_ |
| OLD | NEW |