| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "net/cert/internal/verify_certificate_chain.h" | 5 #include "net/cert/internal/verify_certificate_chain.h" |
| 6 | 6 |
| 7 #include "net/cert/internal/parsed_certificate.h" | 7 #include "net/cert/internal/parsed_certificate.h" |
| 8 #include "net/cert/internal/signature_policy.h" | 8 #include "net/cert/internal/signature_policy.h" |
| 9 #include "net/cert/internal/trust_store.h" | 9 #include "net/cert/internal/trust_store.h" |
| 10 #include "net/der/input.h" | 10 #include "net/der/input.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 TrustAnchor::CreateFromCertificateNoConstraints(input_chain.back()); | 74 TrustAnchor::CreateFromCertificateNoConstraints(input_chain.back()); |
| 75 input_chain.pop_back(); | 75 input_chain.pop_back(); |
| 76 | 76 |
| 77 SimpleSignaturePolicy signature_policy(1024); | 77 SimpleSignaturePolicy signature_policy(1024); |
| 78 | 78 |
| 79 // Run all tests at the time the PKITS was published. | 79 // Run all tests at the time the PKITS was published. |
| 80 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0}; | 80 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0}; |
| 81 | 81 |
| 82 CertPathErrors path_errors; | 82 CertPathErrors path_errors; |
| 83 bool result = VerifyCertificateChain(input_chain, trust_anchor.get(), | 83 bool result = VerifyCertificateChain(input_chain, trust_anchor.get(), |
| 84 &signature_policy, time, &path_errors); | 84 &signature_policy, time, |
| 85 KeyPurpose::ANY_EKU, &path_errors); |
| 85 | 86 |
| 86 // TODO(crbug.com/634443): Test errors on failure? | 87 // TODO(crbug.com/634443): Test errors on failure? |
| 87 EXPECT_EQ(result, !path_errors.ContainsHighSeverityErrors()); | 88 EXPECT_EQ(result, !path_errors.ContainsHighSeverityErrors()); |
| 88 return result; | 89 return result; |
| 89 } | 90 } |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 } // namespace | 93 } // namespace |
| 93 | 94 |
| 94 class PkitsTest01SignatureVerificationCustom | 95 class PkitsTest01SignatureVerificationCustom |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 215 |
| 215 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests, | 216 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests, |
| 216 // PkitsTest05VerifyingPathswithSelfIssuedCertificates, | 217 // PkitsTest05VerifyingPathswithSelfIssuedCertificates, |
| 217 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs | 218 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs |
| 218 | 219 |
| 219 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies, | 220 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies, |
| 220 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings, | 221 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings, |
| 221 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy | 222 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy |
| 222 | 223 |
| 223 } // namespace net | 224 } // namespace net |
| OLD | NEW |