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

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

Issue 2360953002: Add some more TODOs for places to instrument certificate errors. (Closed)
Patch Set: Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/signature_policy.h" 7 #include "net/cert/internal/signature_policy.h"
8 #include "net/cert/internal/trust_store.h" 8 #include "net/cert/internal/trust_store.h"
9 #include "net/cert/internal/verify_certificate_chain_typed_unittest.h" 9 #include "net/cert/internal/verify_certificate_chain_typed_unittest.h"
10 10
(...skipping 12 matching lines...) Expand all
23 ASSERT_TRUE(trust_anchor); 23 ASSERT_TRUE(trust_anchor);
24 24
25 SimpleSignaturePolicy signature_policy(1024); 25 SimpleSignaturePolicy signature_policy(1024);
26 26
27 CertErrors errors; 27 CertErrors errors;
28 bool result = VerifyCertificateChain(chain, trust_anchor.get(), 28 bool result = VerifyCertificateChain(chain, trust_anchor.get(),
29 &signature_policy, time, &errors); 29 &signature_policy, time, &errors);
30 EXPECT_EQ(expected_result, result); 30 EXPECT_EQ(expected_result, result);
31 EXPECT_EQ(expected_errors, errors.ToDebugString()) << "Test file: " 31 EXPECT_EQ(expected_errors, errors.ToDebugString()) << "Test file: "
32 << test_file_path; 32 << test_file_path;
33 if (!result)
34 EXPECT_FALSE(errors.empty());
33 } 35 }
34 }; 36 };
35 37
36 } // namespace 38 } // namespace
37 39
38 INSTANTIATE_TYPED_TEST_CASE_P(VerifyCertificateChain, 40 INSTANTIATE_TYPED_TEST_CASE_P(VerifyCertificateChain,
39 VerifyCertificateChainSingleRootTest, 41 VerifyCertificateChainSingleRootTest,
40 VerifyCertificateChainDelegate); 42 VerifyCertificateChainDelegate);
41 43
42 } // namespace net 44 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/verify_certificate_chain_pkits_unittest.cc ('k') | net/cert/internal/verify_signed_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698