Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Side by Side Diff: net/cert/internal/path_builder_verify_certificate_chain_unittest.cc

Issue 2292333002: Add errors per ResultPath for CertPathBuilder. (Closed)
Patch Set: remove error for null trust anchor Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/cert/internal/cert_issuer_source_static.h" 7 #include "net/cert/internal/cert_issuer_source_static.h"
8 #include "net/cert/internal/signature_policy.h" 8 #include "net/cert/internal/signature_policy.h"
9 #include "net/cert/internal/trust_store_in_memory.h" 9 #include "net/cert/internal/trust_store_in_memory.h"
10 #include "net/cert/internal/verify_certificate_chain_typed_unittest.h" 10 #include "net/cert/internal/verify_certificate_chain_typed_unittest.h"
(...skipping 21 matching lines...) Expand all
32 32
33 CertPathBuilder::Result result; 33 CertPathBuilder::Result result;
34 // First cert in the |chain| is the target. 34 // First cert in the |chain| is the target.
35 CertPathBuilder path_builder(chain.front(), &trust_store, &signature_policy, 35 CertPathBuilder path_builder(chain.front(), &trust_store, &signature_policy,
36 time, &result); 36 time, &result);
37 path_builder.AddCertIssuerSource(&intermediate_cert_issuer_source); 37 path_builder.AddCertIssuerSource(&intermediate_cert_issuer_source);
38 38
39 CompletionStatus rv = path_builder.Run(base::Closure()); 39 CompletionStatus rv = path_builder.Run(base::Closure());
40 EXPECT_EQ(CompletionStatus::SYNC, rv); 40 EXPECT_EQ(CompletionStatus::SYNC, rv);
41 41
42 EXPECT_EQ(expected_result, result.is_success()); 42 EXPECT_EQ(expected_result, result.HasValidPath());
43 } 43 }
44 }; 44 };
45 45
46 } // namespace 46 } // namespace
47 47
48 INSTANTIATE_TYPED_TEST_CASE_P(PathBuilder, 48 INSTANTIATE_TYPED_TEST_CASE_P(PathBuilder,
49 VerifyCertificateChainSingleRootTest, 49 VerifyCertificateChainSingleRootTest,
50 PathBuilderDelegate); 50 PathBuilderDelegate);
51 51
52 } // namespace net 52 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/path_builder_unittest.cc ('k') | net/tools/cert_verify_tool/verify_using_path_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698