OLD | NEW |
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 Loading... |
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 |
OLD | NEW |