| 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 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0}; | 85 der::GeneralizedTime time = {2011, 4, 15, 0, 0, 0}; |
| 86 | 86 |
| 87 CertPathBuilder::Result result; | 87 CertPathBuilder::Result result; |
| 88 CertPathBuilder path_builder(std::move(target_cert), &trust_store, | 88 CertPathBuilder path_builder(std::move(target_cert), &trust_store, |
| 89 &signature_policy, time, &result); | 89 &signature_policy, time, &result); |
| 90 path_builder.AddCertIssuerSource(&cert_issuer_source); | 90 path_builder.AddCertIssuerSource(&cert_issuer_source); |
| 91 | 91 |
| 92 CompletionStatus rv = path_builder.Run(base::Closure()); | 92 CompletionStatus rv = path_builder.Run(base::Closure()); |
| 93 EXPECT_EQ(CompletionStatus::SYNC, rv); | 93 EXPECT_EQ(CompletionStatus::SYNC, rv); |
| 94 | 94 |
| 95 return result.is_success(); | 95 return result.HasValidPath(); |
| 96 } | 96 } |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace | 99 } // namespace |
| 100 | 100 |
| 101 class PkitsTest01SignatureVerificationCustomPathBuilderFoo | 101 class PkitsTest01SignatureVerificationCustomPathBuilderFoo |
| 102 : public PkitsTest<PathBuilderPkitsTestDelegate> {}; | 102 : public PkitsTest<PathBuilderPkitsTestDelegate> {}; |
| 103 | 103 |
| 104 // Modified version of 4.1.4 Valid DSA Signatures Test4 | 104 // Modified version of 4.1.4 Valid DSA Signatures Test4 |
| 105 TEST_F(PkitsTest01SignatureVerificationCustomPathBuilderFoo, | 105 TEST_F(PkitsTest01SignatureVerificationCustomPathBuilderFoo, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 221 |
| 222 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests, | 222 // TODO(mattm): CRL support: PkitsTest04BasicCertificateRevocationTests, |
| 223 // PkitsTest05VerifyingPathswithSelfIssuedCertificates, | 223 // PkitsTest05VerifyingPathswithSelfIssuedCertificates, |
| 224 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs | 224 // PkitsTest14DistributionPoints, PkitsTest15DeltaCRLs |
| 225 | 225 |
| 226 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies, | 226 // TODO(mattm): Certificate Policies support: PkitsTest08CertificatePolicies, |
| 227 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings, | 227 // PkitsTest09RequireExplicitPolicy PkitsTest10PolicyMappings, |
| 228 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy | 228 // PkitsTest11InhibitPolicyMapping, PkitsTest12InhibitAnyPolicy |
| 229 | 229 |
| 230 } // namespace net | 230 } // namespace net |
| OLD | NEW |