| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 5 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "crypto/nss_util_internal.h" | 9 #include "crypto/nss_util_internal.h" |
| 10 #include "crypto/scoped_test_nss_chromeos_user.h" | 10 #include "crypto/scoped_test_nss_chromeos_user.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 net::X509Certificate* cert, | 100 net::X509Certificate* cert, |
| 101 std::string* root_subject_name) { | 101 std::string* root_subject_name) { |
| 102 net::CertificateList additional_trust_anchors; | 102 net::CertificateList additional_trust_anchors; |
| 103 return VerifyWithAdditionalTrustAnchors( | 103 return VerifyWithAdditionalTrustAnchors( |
| 104 verify_proc, additional_trust_anchors, cert, root_subject_name); | 104 verify_proc, additional_trust_anchors, cert, root_subject_name); |
| 105 } | 105 } |
| 106 | 106 |
| 107 protected: | 107 protected: |
| 108 crypto::ScopedTestNSSChromeOSUser user_1_; | 108 crypto::ScopedTestNSSChromeOSUser user_1_; |
| 109 crypto::ScopedTestNSSChromeOSUser user_2_; | 109 crypto::ScopedTestNSSChromeOSUser user_2_; |
| 110 scoped_ptr<net::NSSCertDatabaseChromeOS> db_1_; | 110 std::unique_ptr<net::NSSCertDatabaseChromeOS> db_1_; |
| 111 scoped_ptr<net::NSSCertDatabaseChromeOS> db_2_; | 111 std::unique_ptr<net::NSSCertDatabaseChromeOS> db_2_; |
| 112 scoped_refptr<net::CertVerifyProc> verify_proc_default_; | 112 scoped_refptr<net::CertVerifyProc> verify_proc_default_; |
| 113 scoped_refptr<net::CertVerifyProc> verify_proc_1_; | 113 scoped_refptr<net::CertVerifyProc> verify_proc_1_; |
| 114 scoped_refptr<net::CertVerifyProc> verify_proc_2_; | 114 scoped_refptr<net::CertVerifyProc> verify_proc_2_; |
| 115 net::CertificateList certs_1_; | 115 net::CertificateList certs_1_; |
| 116 net::CertificateList certs_2_; | 116 net::CertificateList certs_2_; |
| 117 net::CertificateList root_1_; | 117 net::CertificateList root_1_; |
| 118 net::CertificateList root_2_; | 118 net::CertificateList root_2_; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 // Test that the CertVerifyProcChromeOS doesn't trusts roots that are in other | 121 // Test that the CertVerifyProcChromeOS doesn't trusts roots that are in other |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 372 |
| 373 INSTANTIATE_TEST_CASE_P( | 373 INSTANTIATE_TEST_CASE_P( |
| 374 Variations, | 374 Variations, |
| 375 CertVerifyProcChromeOSOrderingTest, | 375 CertVerifyProcChromeOSOrderingTest, |
| 376 ::testing::Combine( | 376 ::testing::Combine( |
| 377 ::testing::Bool(), | 377 ::testing::Bool(), |
| 378 ::testing::Range(0, 1 << 2), | 378 ::testing::Range(0, 1 << 2), |
| 379 ::testing::Values("d12", "d21", "1d2", "12d", "2d1", "21d"))); | 379 ::testing::Values("d12", "d21", "1d2", "12d", "2d1", "21d"))); |
| 380 | 380 |
| 381 } // namespace chromeos | 381 } // namespace chromeos |
| OLD | NEW |