| 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_BASE_X509_CERTIFICATE_H_ | 5 #ifndef NET_BASE_X509_CERTIFICATE_H_ |
| 6 #define NET_BASE_X509_CERTIFICATE_H_ | 6 #define NET_BASE_X509_CERTIFICATE_H_ |
| 7 | 7 |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 CFArrayRef CreateClientCertificateChain() const; | 297 CFArrayRef CreateClientCertificateChain() const; |
| 298 | 298 |
| 299 // Returns a new CFArrayRef containing this certificate and its intermediate | 299 // Returns a new CFArrayRef containing this certificate and its intermediate |
| 300 // certificates in the form expected by Security.framework and Keychain | 300 // certificates in the form expected by Security.framework and Keychain |
| 301 // Services, or NULL on failure. | 301 // Services, or NULL on failure. |
| 302 // The first item in the array will be this certificate, followed by its | 302 // The first item in the array will be this certificate, followed by its |
| 303 // intermediates, if any. | 303 // intermediates, if any. |
| 304 CFArrayRef CreateOSCertChainForCert() const; | 304 CFArrayRef CreateOSCertChainForCert() const; |
| 305 #endif | 305 #endif |
| 306 | 306 |
| 307 // Do any of the given issuer names appear in this cert's chain of trust? |
| 308 // |valid_issuers| is a list of DER-encoded X.509 DistinguishedNames. |
| 309 bool IsIssuedByEncoded(const std::vector<std::string>& valid_issuers); |
| 310 |
| 307 #if defined(OS_WIN) | 311 #if defined(OS_WIN) |
| 308 // Returns a new PCCERT_CONTEXT containing this certificate and its | 312 // Returns a new PCCERT_CONTEXT containing this certificate and its |
| 309 // intermediate certificates, or NULL on failure. The returned | 313 // intermediate certificates, or NULL on failure. The returned |
| 310 // PCCERT_CONTEXT *MUST NOT* be stored in an X509Certificate, as this will | 314 // PCCERT_CONTEXT *MUST NOT* be stored in an X509Certificate, as this will |
| 311 // cause os_cert_handle() to return incorrect results. This function is only | 315 // cause os_cert_handle() to return incorrect results. This function is only |
| 312 // necessary if the CERT_CONTEXT.hCertStore member will be accessed or | 316 // necessary if the CERT_CONTEXT.hCertStore member will be accessed or |
| 313 // enumerated, which is generally true for any CryptoAPI functions involving | 317 // enumerated, which is generally true for any CryptoAPI functions involving |
| 314 // certificate chains, including validation or certificate display. | 318 // certificate chains, including validation or certificate display. |
| 315 // | 319 // |
| 316 // Remarks: | 320 // Remarks: |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // based on the type of the certificate. | 515 // based on the type of the certificate. |
| 512 std::string default_nickname_; | 516 std::string default_nickname_; |
| 513 #endif | 517 #endif |
| 514 | 518 |
| 515 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 519 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 516 }; | 520 }; |
| 517 | 521 |
| 518 } // namespace net | 522 } // namespace net |
| 519 | 523 |
| 520 #endif // NET_BASE_X509_CERTIFICATE_H_ | 524 #endif // NET_BASE_X509_CERTIFICATE_H_ |
| OLD | NEW |