| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ | 5 #ifndef NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ |
| 6 #define NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ | 6 #define NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // trust_store: | 44 // trust_store: |
| 45 // Contains the set of trusted public keys (and their names). | 45 // Contains the set of trusted public keys (and their names). |
| 46 // | 46 // |
| 47 // signature_policy: | 47 // signature_policy: |
| 48 // The policy to use when verifying signatures (what hash algorithms are | 48 // The policy to use when verifying signatures (what hash algorithms are |
| 49 // allowed, what length keys, what named curves, etc). | 49 // allowed, what length keys, what named curves, etc). |
| 50 // | 50 // |
| 51 // time: | 51 // time: |
| 52 // The UTC time to use for expiration checks. | 52 // The UTC time to use for expiration checks. |
| 53 // | 53 // |
| 54 // trusted_chain_out: |
| 55 // The vector to populate with the verified trusted certificate chain. |
| 56 // * trusted_chain_out[0] is the target certificate verified. |
| 57 // * trusted_chain_out[i+1] holds the certificate that issued |
| 58 // trusted_chain_out[i]. |
| 59 // * trusted_chain_out[N-1] is the trust anchor. |
| 60 // If a nullptr is passed, this parameter is ignored. |
| 61 // If the target certificate can not be verified, this parameter is |
| 62 // ignored. |
| 63 // |
| 54 // --------- | 64 // --------- |
| 55 // Outputs | 65 // Outputs |
| 56 // --------- | 66 // --------- |
| 57 // | 67 // |
| 58 // Returns true if the target certificate can be verified. | 68 // Returns true if the target certificate can be verified. |
| 59 NET_EXPORT bool VerifyCertificateChain( | 69 NET_EXPORT bool VerifyCertificateChain( |
| 60 const std::vector<scoped_refptr<ParsedCertificate>>& cert_chain, | 70 const std::vector<scoped_refptr<ParsedCertificate>>& cert_chain, |
| 61 const TrustStore& trust_store, | 71 const TrustStore& trust_store, |
| 62 const SignaturePolicy* signature_policy, | 72 const SignaturePolicy* signature_policy, |
| 63 const der::GeneralizedTime& time) WARN_UNUSED_RESULT; | 73 const der::GeneralizedTime& time, |
| 74 std::vector<scoped_refptr<ParsedCertificate>>* trusted_chain_out) |
| 75 WARN_UNUSED_RESULT; |
| 64 | 76 |
| 65 } // namespace net | 77 } // namespace net |
| 66 | 78 |
| 67 #endif // NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ | 79 #endif // NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ |
| OLD | NEW |