OLD | NEW |
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 #include "chromeos/network/client_cert_resolver.h" | 4 #include "chromeos/network/client_cert_resolver.h" |
5 | 5 |
6 #include <cert.h> | 6 #include <cert.h> |
7 #include <pk11pub.h> | 7 #include <pk11pub.h> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chromeos/cert_loader.h" | 15 #include "chromeos/cert_loader.h" |
16 #include "chromeos/dbus/dbus_thread_manager.h" | 16 #include "chromeos/dbus/dbus_thread_manager.h" |
17 #include "chromeos/dbus/shill_manager_client.h" | 17 #include "chromeos/dbus/shill_manager_client.h" |
18 #include "chromeos/dbus/shill_profile_client.h" | 18 #include "chromeos/dbus/shill_profile_client.h" |
19 #include "chromeos/dbus/shill_service_client.h" | 19 #include "chromeos/dbus/shill_service_client.h" |
20 #include "chromeos/network/managed_network_configuration_handler_impl.h" | 20 #include "chromeos/network/managed_network_configuration_handler_impl.h" |
21 #include "chromeos/network/network_configuration_handler.h" | 21 #include "chromeos/network/network_configuration_handler.h" |
22 #include "chromeos/network/network_profile_handler.h" | 22 #include "chromeos/network/network_profile_handler.h" |
23 #include "chromeos/network/network_state_handler.h" | 23 #include "chromeos/network/network_state_handler.h" |
24 #include "chromeos/tpm_token_loader.h" | 24 #include "chromeos/tpm_token_loader.h" |
25 #include "components/onc/onc_constants.h" | 25 #include "components/onc/onc_constants.h" |
26 #include "crypto/nss_util.h" | |
27 #include "crypto/nss_util_internal.h" | 26 #include "crypto/nss_util_internal.h" |
| 27 #include "crypto/scoped_test_nss_chromeos_user.h" |
28 #include "net/base/crypto_module.h" | 28 #include "net/base/crypto_module.h" |
29 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
30 #include "net/base/test_data_directory.h" | 30 #include "net/base/test_data_directory.h" |
31 #include "net/cert/nss_cert_database_chromeos.h" | 31 #include "net/cert/nss_cert_database_chromeos.h" |
32 #include "net/cert/x509_certificate.h" | 32 #include "net/cert/x509_certificate.h" |
33 #include "net/test/cert_test_util.h" | 33 #include "net/test/cert_test_util.h" |
34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
35 #include "third_party/cros_system_api/dbus/service_constants.h" | 35 #include "third_party/cros_system_api/dbus/service_constants.h" |
36 | 36 |
37 namespace chromeos { | 37 namespace chromeos { |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 base::RunLoop().RunUntilIdle(); | 310 base::RunLoop().RunUntilIdle(); |
311 | 311 |
312 // Verify that the resolver positively matched the pattern in the policy with | 312 // Verify that the resolver positively matched the pattern in the policy with |
313 // the test client cert and configured the network. | 313 // the test client cert and configured the network. |
314 std::string pkcs11_id; | 314 std::string pkcs11_id; |
315 GetClientCertProperties(&pkcs11_id); | 315 GetClientCertProperties(&pkcs11_id); |
316 EXPECT_EQ(test_pkcs11_id_, pkcs11_id); | 316 EXPECT_EQ(test_pkcs11_id_, pkcs11_id); |
317 } | 317 } |
318 | 318 |
319 } // namespace chromeos | 319 } // namespace chromeos |
OLD | NEW |