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

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

Issue 2346663002: Generalize rebase-errors.py so it works for other files. (Closed)
Patch Set: moar comment wording 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
« no previous file with comments | « net/cert/internal/path_builder_unittest.cc ('k') | net/cert/internal/test_helpers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 11
12 namespace net { 12 namespace net {
13 13
14 namespace { 14 namespace {
15 15
16 class PathBuilderDelegate { 16 class PathBuilderDelegate {
17 public: 17 public:
18 static void Verify(const ParsedCertificateList& chain, 18 static void Verify(const ParsedCertificateList& chain,
19 const scoped_refptr<TrustAnchor>& trust_anchor, 19 const scoped_refptr<TrustAnchor>& trust_anchor,
20 const der::GeneralizedTime& time, 20 const der::GeneralizedTime& time,
21 bool expected_result, 21 bool expected_result,
22 const std::string& expected_errors) { 22 const std::string& expected_errors,
23 const std::string& test_file_path) {
23 SimpleSignaturePolicy signature_policy(1024); 24 SimpleSignaturePolicy signature_policy(1024);
24 ASSERT_FALSE(chain.empty()); 25 ASSERT_FALSE(chain.empty());
25 26
26 TrustStoreInMemory trust_store; 27 TrustStoreInMemory trust_store;
27 trust_store.AddTrustAnchor(trust_anchor); 28 trust_store.AddTrustAnchor(trust_anchor);
28 29
29 CertIssuerSourceStatic intermediate_cert_issuer_source; 30 CertIssuerSourceStatic intermediate_cert_issuer_source;
30 for (size_t i = 1; i < chain.size(); ++i) 31 for (size_t i = 1; i < chain.size(); ++i)
31 intermediate_cert_issuer_source.AddCert(chain[i]); 32 intermediate_cert_issuer_source.AddCert(chain[i]);
32 33
(...skipping 10 matching lines...) Expand all
43 } 44 }
44 }; 45 };
45 46
46 } // namespace 47 } // namespace
47 48
48 INSTANTIATE_TYPED_TEST_CASE_P(PathBuilder, 49 INSTANTIATE_TYPED_TEST_CASE_P(PathBuilder,
49 VerifyCertificateChainSingleRootTest, 50 VerifyCertificateChainSingleRootTest,
50 PathBuilderDelegate); 51 PathBuilderDelegate);
51 52
52 } // namespace net 53 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/path_builder_unittest.cc ('k') | net/cert/internal/test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698