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" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
13 #include "net/cert/internal/cert_errors.h" | 13 #include "net/cert/internal/cert_errors.h" |
14 #include "net/cert/internal/parsed_certificate.h" | 14 #include "net/cert/internal/parsed_certificate.h" |
15 #include "net/der/input.h" | 15 #include "net/der/input.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 namespace der { | 19 namespace der { |
20 struct GeneralizedTime; | 20 struct GeneralizedTime; |
21 } | 21 } |
22 | 22 |
23 class SignaturePolicy; | 23 class SignaturePolicy; |
24 class TrustAnchor; | 24 class TrustAnchor; |
25 class TrustStore; | |
26 | 25 |
27 // VerifyCertificateChain() verifies a certificate path (chain) based on the | 26 // VerifyCertificateChain() verifies a certificate path (chain) based on the |
28 // rules in RFC 5280. The caller is responsible for building the path and | 27 // rules in RFC 5280. The caller is responsible for building the path and |
29 // finding the trust anchor. | 28 // finding the trust anchor. |
30 // | 29 // |
31 // WARNING: This implementation is in progress, and is currently incomplete. | 30 // WARNING: This implementation is in progress, and is currently incomplete. |
32 // Consult an OWNER before using it. | 31 // Consult an OWNER before using it. |
33 // | 32 // |
34 // TODO(eroman): Take a CertPath instead of ParsedCertificateList + | 33 // TODO(eroman): Take a CertPath instead of ParsedCertificateList + |
35 // TrustAnchor. | 34 // TrustAnchor. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // boolean return value to determine success/failure. | 70 // boolean return value to determine success/failure. |
72 NET_EXPORT bool VerifyCertificateChain(const ParsedCertificateList& certs, | 71 NET_EXPORT bool VerifyCertificateChain(const ParsedCertificateList& certs, |
73 const TrustAnchor* trust_anchor, | 72 const TrustAnchor* trust_anchor, |
74 const SignaturePolicy* signature_policy, | 73 const SignaturePolicy* signature_policy, |
75 const der::GeneralizedTime& time, | 74 const der::GeneralizedTime& time, |
76 CertErrors* errors) WARN_UNUSED_RESULT; | 75 CertErrors* errors) WARN_UNUSED_RESULT; |
77 | 76 |
78 } // namespace net | 77 } // namespace net |
79 | 78 |
80 #endif // NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ | 79 #endif // NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ |
OLD | NEW |