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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // validating the path are appended to this structure. There is no | 68 // validating the path are appended to this structure. There is no |
69 // guarantee that on success |errors| is empty, or conversely that | 69 // guarantee that on success |errors| is empty, or conversely that |
70 // on failure |errors| is non-empty. Consumers must only use the | 70 // on failure |errors| is non-empty. Consumers must only use the |
71 // boolean return value to determine success/failure. | 71 // boolean return value to determine success/failure. |
72 NET_EXPORT bool VerifyCertificateChain(const ParsedCertificateList& certs, | 72 NET_EXPORT bool VerifyCertificateChain(const ParsedCertificateList& certs, |
73 const TrustAnchor* trust_anchor, | 73 const TrustAnchor* trust_anchor, |
74 const SignaturePolicy* signature_policy, | 74 const SignaturePolicy* signature_policy, |
75 const der::GeneralizedTime& time, | 75 const der::GeneralizedTime& time, |
76 CertErrors* errors) WARN_UNUSED_RESULT; | 76 CertErrors* errors) WARN_UNUSED_RESULT; |
77 | 77 |
78 // ----------------------------------------------- | |
79 // Errors/Warnings set by VerifyCertificateChain | |
80 // ----------------------------------------------- | |
81 | |
82 namespace verify_certificate_chain_errors { | |
83 | |
84 // TODO(eroman): Document each of these and their parameters. | |
85 extern CertErrorId kSignatureAlgorithmMismatch; | |
86 extern CertErrorId kInvalidOrUnsupportedSignatureAlgorithm; | |
87 extern CertErrorId kChainIsEmpty; | |
88 extern CertErrorId kUnconsumedCriticalExtension; | |
89 extern CertErrorId kTargetCertInconsistentCaBits; | |
90 extern CertErrorId kKeyCertSignBitNotSet; | |
91 extern CertErrorId kMaxPathLengthViolated; | |
92 extern CertErrorId kBasicConstraintsIndicatesNotCa; | |
93 extern CertErrorId kMissingBasicConstraints; | |
94 extern CertErrorId kNotPermittedByNameConstraints; | |
95 extern CertErrorId kSubjectDoesNotMatchIssuer; | |
96 extern CertErrorId kVerifySignedDataFailed; | |
97 extern CertErrorId kValidityFailedNotAfter; | |
98 extern CertErrorId kValidityFailedNotBefore; | |
99 extern CertErrorId kSignatureAlgorithmsDifferentEncoding; | |
100 | |
101 } // namespace verify_certificate_chain_errors | |
102 | |
103 } // namespace net | 78 } // namespace net |
104 | 79 |
105 #endif // NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ | 80 #endif // NET_CERT_INTERNAL_VERIFY_CERTIFICATE_CHAIN_H_ |
OLD | NEW |