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 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 std::string name = wifi ? kWifiStub : kEthernetEapStub; | 169 std::string name = wifi ? kWifiStub : kEthernetEapStub; |
170 AddService(name, type, shill::kStateOnline); | 170 AddService(name, type, shill::kStateOnline); |
171 service_test_->SetServiceProperty( | 171 service_test_->SetServiceProperty( |
172 name, shill::kEapCertIdProperty, base::StringValue(cert_id)); | 172 name, shill::kEapCertIdProperty, base::StringValue(cert_id)); |
173 service_test_->SetServiceProperty( | 173 service_test_->SetServiceProperty( |
174 name, shill::kEapKeyIdProperty, base::StringValue(cert_id)); | 174 name, shill::kEapKeyIdProperty, base::StringValue(cert_id)); |
175 | 175 |
176 if (wifi) { | 176 if (wifi) { |
177 service_test_->SetServiceProperty( | 177 service_test_->SetServiceProperty( |
178 name, | 178 name, |
179 shill::kSecurityProperty, | 179 shill::kSecurityClassProperty, |
180 base::StringValue(shill::kSecurity8021x)); | 180 base::StringValue(shill::kSecurity8021x)); |
181 } | 181 } |
182 } | 182 } |
183 | 183 |
184 void GetEapCertId(bool wifi, std::string* cert_id) { | 184 void GetEapCertId(bool wifi, std::string* cert_id) { |
185 cert_id->clear(); | 185 cert_id->clear(); |
186 | 186 |
187 std::string name = wifi ? kWifiStub : kEthernetEapStub; | 187 std::string name = wifi ? kWifiStub : kEthernetEapStub; |
188 const base::DictionaryValue* properties = | 188 const base::DictionaryValue* properties = |
189 service_test_->GetServiceProperties(name); | 189 service_test_->GetServiceProperties(name); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 std::string pkcs11_id; | 503 std::string pkcs11_id; |
504 std::string slot_id; | 504 std::string slot_id; |
505 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); | 505 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); |
506 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); | 506 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); |
507 EXPECT_EQ(test_client_cert_slot_id_, slot_id); | 507 EXPECT_EQ(test_client_cert_slot_id_, slot_id); |
508 } | 508 } |
509 | 509 |
510 } // namespace chromeos | 510 } // namespace chromeos |
511 | 511 |
512 #endif | 512 #endif |
OLD | NEW |