| 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/path_builder.h" | 5 #include "net/cert/internal/path_builder.h" |
| 6 | 6 |
| 7 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
| 8 #include "net/cert/internal/cert_issuer_source_static.h" | 8 #include "net/cert/internal/cert_issuer_source_static.h" |
| 9 #include "net/cert/internal/parse_certificate.h" | 9 #include "net/cert/internal/parse_certificate.h" |
| 10 #include "net/cert/internal/parsed_certificate.h" | 10 #include "net/cert/internal/parsed_certificate.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 scoped_refptr<ParsedCertificate> target_cert(certs.back()); | 86 scoped_refptr<ParsedCertificate> target_cert(certs.back()); |
| 87 | 87 |
| 88 SimpleSignaturePolicy signature_policy(1024); | 88 SimpleSignaturePolicy signature_policy(1024); |
| 89 | 89 |
| 90 // Run all tests at the time the PKITS was published. | 90 // Run all tests at the time the PKITS was published. |
| 91 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0}; | 91 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0}; |
| 92 | 92 |
| 93 CertPathBuilder::Result result; | 93 CertPathBuilder::Result result; |
| 94 CertPathBuilder path_builder(std::move(target_cert), &trust_store, | 94 CertPathBuilder path_builder(std::move(target_cert), &trust_store, |
| 95 &signature_policy, time, &result); | 95 &signature_policy, time, KeyPurpose::ANY_EKU, |
| 96 &result); |
| 96 path_builder.AddCertIssuerSource(&cert_issuer_source); | 97 path_builder.AddCertIssuerSource(&cert_issuer_source); |
| 97 | 98 |
| 98 path_builder.Run(); | 99 path_builder.Run(); |
| 99 | 100 |
| 100 return result.HasValidPath(); | 101 return result.HasValidPath(); |
| 101 } | 102 } |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace | 105 } // namespace |
| 105 | 106 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 227 |
| 227 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests, | 228 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests, |
| 228 // PkitsTest05VerifyingPathswithSelfIssuedCertificates, | 229 // PkitsTest05VerifyingPathswithSelfIssuedCertificates, |
| 229 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs | 230 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs |
| 230 | 231 |
| 231 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies, | 232 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies, |
| 232 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings, | 233 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings, |
| 233 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy | 234 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy |
| 234 | 235 |
| 235 } // namespace net | 236 } // namespace net |
| OLD | NEW |