OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/nss_cert_database.h" | 5 #include "net/cert/nss_cert_database.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <certdb.h> | 8 #include <certdb.h> |
9 #include <pk11pub.h> | 9 #include <pk11pub.h> |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <memory> | 12 #include <memory> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
17 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
18 #include "base/run_loop.h" | 18 #include "base/run_loop.h" |
19 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
22 #include "base/threading/thread_task_runner_handle.h" | 22 #include "base/threading/thread_task_runner_handle.h" |
23 #include "crypto/scoped_nss_types.h" | 23 #include "crypto/scoped_nss_types.h" |
24 #include "crypto/scoped_test_nss_db.h" | 24 #include "crypto/scoped_test_nss_db.h" |
25 #include "net/base/crypto_module.h" | |
26 #include "net/base/hash_value.h" | 25 #include "net/base/hash_value.h" |
27 #include "net/base/net_errors.h" | 26 #include "net/base/net_errors.h" |
28 #include "net/cert/cert_status_flags.h" | 27 #include "net/cert/cert_status_flags.h" |
29 #include "net/cert/cert_verify_proc_nss.h" | 28 #include "net/cert/cert_verify_proc_nss.h" |
30 #include "net/cert/cert_verify_result.h" | 29 #include "net/cert/cert_verify_result.h" |
31 #include "net/cert/x509_certificate.h" | 30 #include "net/cert/x509_certificate.h" |
32 #include "net/test/cert_test_util.h" | 31 #include "net/test/cert_test_util.h" |
33 #include "net/test/gtest_util.h" | 32 #include "net/test/gtest_util.h" |
34 #include "net/test/test_data_directory.h" | 33 #include "net/test/test_data_directory.h" |
35 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" | 34 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 EXPECT_EQ(NSSCertDatabase::TRUST_DEFAULT, | 1013 EXPECT_EQ(NSSCertDatabase::TRUST_DEFAULT, |
1015 cert_db_->GetCertTrust(certs2[0].get(), SERVER_CERT)); | 1014 cert_db_->GetCertTrust(certs2[0].get(), SERVER_CERT)); |
1016 | 1015 |
1017 new_certs = ListCerts(); | 1016 new_certs = ListCerts(); |
1018 ASSERT_EQ(2U, new_certs.size()); | 1017 ASSERT_EQ(2U, new_certs.size()); |
1019 EXPECT_STRNE(new_certs[0]->os_cert_handle()->nickname, | 1018 EXPECT_STRNE(new_certs[0]->os_cert_handle()->nickname, |
1020 new_certs[1]->os_cert_handle()->nickname); | 1019 new_certs[1]->os_cert_handle()->nickname); |
1021 } | 1020 } |
1022 | 1021 |
1023 } // namespace net | 1022 } // namespace net |
OLD | NEW |