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 | 4 |
5 #include "chromeos/network/network_cert_migrator.h" | 5 #include "chromeos/network/network_cert_migrator.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 std::string name = wifi ? kWifiStub : kEthernetEapStub; | 115 std::string name = wifi ? kWifiStub : kEthernetEapStub; |
116 AddService(name, type, shill::kStateOnline); | 116 AddService(name, type, shill::kStateOnline); |
117 service_test_->SetServiceProperty( | 117 service_test_->SetServiceProperty( |
118 name, shill::kEapCertIdProperty, base::StringValue(cert_id)); | 118 name, shill::kEapCertIdProperty, base::StringValue(cert_id)); |
119 service_test_->SetServiceProperty( | 119 service_test_->SetServiceProperty( |
120 name, shill::kEapKeyIdProperty, base::StringValue(cert_id)); | 120 name, shill::kEapKeyIdProperty, base::StringValue(cert_id)); |
121 | 121 |
122 if (wifi) { | 122 if (wifi) { |
123 service_test_->SetServiceProperty( | 123 service_test_->SetServiceProperty( |
124 name, | 124 name, |
125 shill::kSecurityProperty, | 125 shill::kSecurityClassProperty, |
126 base::StringValue(shill::kSecurity8021x)); | 126 base::StringValue(shill::kSecurity8021x)); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 void GetEapCertId(bool wifi, std::string* cert_id) { | 130 void GetEapCertId(bool wifi, std::string* cert_id) { |
131 cert_id->clear(); | 131 cert_id->clear(); |
132 | 132 |
133 std::string name = wifi ? kWifiStub : kEthernetEapStub; | 133 std::string name = wifi ? kWifiStub : kEthernetEapStub; |
134 const base::DictionaryValue* properties = | 134 const base::DictionaryValue* properties = |
135 service_test_->GetServiceProperties(name); | 135 service_test_->GetServiceProperties(name); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 base::RunLoop().RunUntilIdle(); | 331 base::RunLoop().RunUntilIdle(); |
332 | 332 |
333 std::string pkcs11_id; | 333 std::string pkcs11_id; |
334 std::string slot_id; | 334 std::string slot_id; |
335 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); | 335 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); |
336 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); | 336 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); |
337 EXPECT_EQ(test_client_cert_slot_id_, slot_id); | 337 EXPECT_EQ(test_client_cert_slot_id_, slot_id); |
338 } | 338 } |
339 | 339 |
340 } // namespace chromeos | 340 } // namespace chromeos |
OLD | NEW |