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

Side by Side Diff: net/cert/test_root_certs_unittest.cc

Issue 1910523002: Remove extraneous USE_NSS_VERIFIER macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « components/cronet/ios/cronet_environment.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/base/test_data_directory.h" 8 #include "net/base/test_data_directory.h"
9 #include "net/cert/cert_status_flags.h" 9 #include "net/cert/cert_status_flags.h"
10 #include "net/cert/cert_verify_proc.h" 10 #include "net/cert/cert_verify_proc.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 test_roots->Clear(); 61 test_roots->Clear();
62 EXPECT_TRUE(test_roots->IsEmpty()); 62 EXPECT_TRUE(test_roots->IsEmpty());
63 } 63 }
64 64
65 // Test that TestRootCerts actually adds the appropriate trust status flags 65 // Test that TestRootCerts actually adds the appropriate trust status flags
66 // when requested, and that the trusted status is cleared once the root is 66 // when requested, and that the trusted status is cleared once the root is
67 // removed the TestRootCerts. This test acts as a canary/sanity check for 67 // removed the TestRootCerts. This test acts as a canary/sanity check for
68 // the results of the rest of net_unittests, ensuring that the trust status 68 // the results of the rest of net_unittests, ensuring that the trust status
69 // is properly being set and cleared. 69 // is properly being set and cleared.
70 TEST(TestRootCertsTest, OverrideTrust) { 70 TEST(TestRootCertsTest, OverrideTrust) {
71 #if defined(USE_NSS_VERIFIER) 71 #if defined(USE_NSS_CERTS)
72 if (NSS_VersionCheck("3.14.2") && !NSS_VersionCheck("3.15")) { 72 if (NSS_VersionCheck("3.14.2") && !NSS_VersionCheck("3.15")) {
73 // See http://bugzil.la/863947 for details 73 // See http://bugzil.la/863947 for details
74 LOG(INFO) << "Skipping test for NSS 3.14.2 - NSS 3.15"; 74 LOG(INFO) << "Skipping test for NSS 3.14.2 - NSS 3.15";
75 return; 75 return;
76 } 76 }
77 #endif 77 #endif
78 TestRootCerts* test_roots = TestRootCerts::GetInstance(); 78 TestRootCerts* test_roots = TestRootCerts::GetInstance();
79 ASSERT_NE(static_cast<TestRootCerts*>(NULL), test_roots); 79 ASSERT_NE(static_cast<TestRootCerts*>(NULL), test_roots);
80 EXPECT_TRUE(test_roots->IsEmpty()); 80 EXPECT_TRUE(test_roots->IsEmpty());
81 81
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 EXPECT_FALSE(test_roots->Contains(root_cert_1->os_cert_handle())); 157 EXPECT_FALSE(test_roots->Contains(root_cert_1->os_cert_handle()));
158 EXPECT_FALSE(test_roots->Contains(root_cert_2->os_cert_handle())); 158 EXPECT_FALSE(test_roots->Contains(root_cert_2->os_cert_handle()));
159 } 159 }
160 #endif 160 #endif
161 161
162 // TODO(rsleevi): Add tests for revocation checking via CRLs, ensuring that 162 // TODO(rsleevi): Add tests for revocation checking via CRLs, ensuring that
163 // TestRootCerts properly injects itself into the validation process. See 163 // TestRootCerts properly injects itself into the validation process. See
164 // http://crbug.com/63958 164 // http://crbug.com/63958
165 165
166 } // namespace net 166 } // namespace net
OLDNEW
« no previous file with comments | « components/cronet/ios/cronet_environment.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698