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 "chromeos/network/client_cert_util.h" | 5 #include "chromeos/network/client_cert_util.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 break; | 257 break; |
258 } | 258 } |
259 } | 259 } |
260 } | 260 } |
261 | 261 |
262 ClientCertConfig::ClientCertConfig() | 262 ClientCertConfig::ClientCertConfig() |
263 : location(CONFIG_TYPE_NONE), | 263 : location(CONFIG_TYPE_NONE), |
264 client_cert_type(onc::client_cert::kClientCertTypeNone) { | 264 client_cert_type(onc::client_cert::kClientCertTypeNone) { |
265 } | 265 } |
266 | 266 |
| 267 ClientCertConfig::ClientCertConfig(const ClientCertConfig& other) = default; |
| 268 |
267 void OncToClientCertConfig(const base::DictionaryValue& network_config, | 269 void OncToClientCertConfig(const base::DictionaryValue& network_config, |
268 ClientCertConfig* cert_config) { | 270 ClientCertConfig* cert_config) { |
269 using namespace ::onc; | 271 using namespace ::onc; |
270 | 272 |
271 *cert_config = ClientCertConfig(); | 273 *cert_config = ClientCertConfig(); |
272 | 274 |
273 const base::DictionaryValue* dict_with_client_cert = NULL; | 275 const base::DictionaryValue* dict_with_client_cert = NULL; |
274 | 276 |
275 const base::DictionaryValue* wifi = NULL; | 277 const base::DictionaryValue* wifi = NULL; |
276 network_config.GetDictionaryWithoutPathExpansion(network_config::kWiFi, | 278 network_config.GetDictionaryWithoutPathExpansion(network_config::kWiFi, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 return !cert_id.empty() && !key_id.empty() && !identity.empty(); | 353 return !cert_id.empty() && !key_id.empty() && !identity.empty(); |
352 } | 354 } |
353 } | 355 } |
354 NOTREACHED(); | 356 NOTREACHED(); |
355 return false; | 357 return false; |
356 } | 358 } |
357 | 359 |
358 } // namespace client_cert | 360 } // namespace client_cert |
359 | 361 |
360 } // namespace chromeos | 362 } // namespace chromeos |
OLD | NEW |