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/onc/onc_translation_tables.h" | 5 #include "chromeos/network/onc/onc_translation_tables.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chromeos/network/network_type_pattern.h" | 10 #include "chromeos/network/network_type_pattern.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 {::onc::eap::kAnonymousIdentity, shill::kEapAnonymousIdentityProperty}, | 24 {::onc::eap::kAnonymousIdentity, shill::kEapAnonymousIdentityProperty}, |
25 {::onc::eap::kIdentity, shill::kEapIdentityProperty}, | 25 {::onc::eap::kIdentity, shill::kEapIdentityProperty}, |
26 // This field is converted during translation, see onc_translator_*. | 26 // This field is converted during translation, see onc_translator_*. |
27 // { ::onc::eap::kInner, shill::kEapPhase2AuthProperty }, | 27 // { ::onc::eap::kInner, shill::kEapPhase2AuthProperty }, |
28 | 28 |
29 // This field is converted during translation, see onc_translator_*. | 29 // This field is converted during translation, see onc_translator_*. |
30 // { ::onc::eap::kOuter, shill::kEapMethodProperty }, | 30 // { ::onc::eap::kOuter, shill::kEapMethodProperty }, |
31 {::onc::eap::kPassword, shill::kEapPasswordProperty}, | 31 {::onc::eap::kPassword, shill::kEapPasswordProperty}, |
32 {::onc::eap::kSaveCredentials, shill::kSaveCredentialsProperty}, | 32 {::onc::eap::kSaveCredentials, shill::kSaveCredentialsProperty}, |
33 {::onc::eap::kServerCAPEMs, shill::kEapCaCertPemProperty}, | 33 {::onc::eap::kServerCAPEMs, shill::kEapCaCertPemProperty}, |
| 34 {::onc::eap::kSubjectMatch, shill::kEapSubjectMatchProperty}, |
34 {::onc::eap::kUseSystemCAs, shill::kEapUseSystemCasProperty}, | 35 {::onc::eap::kUseSystemCAs, shill::kEapUseSystemCasProperty}, |
35 {::onc::eap::kUseProactiveKeyCaching, | 36 {::onc::eap::kUseProactiveKeyCaching, |
36 shill::kEapUseProactiveKeyCachingProperty}, | 37 shill::kEapUseProactiveKeyCachingProperty}, |
37 {NULL}}; | 38 {NULL}}; |
38 | 39 |
39 const FieldTranslationEntry ipsec_fields[] = { | 40 const FieldTranslationEntry ipsec_fields[] = { |
40 // This field is converted during translation, see onc_translator_*. | 41 // This field is converted during translation, see onc_translator_*. |
41 // { ::onc::ipsec::kAuthenticationType, shill::kL2tpIpsecAuthenticationType | 42 // { ::onc::ipsec::kAuthenticationType, shill::kL2tpIpsecAuthenticationType |
42 // }, | 43 // }, |
43 {::onc::ipsec::kGroup, shill::kL2tpIpsecTunnelGroupProperty}, | 44 {::onc::ipsec::kGroup, shill::kL2tpIpsecTunnelGroupProperty}, |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 314 |
314 const StringTranslationEntry kEAPOuterTable[] = { | 315 const StringTranslationEntry kEAPOuterTable[] = { |
315 {::onc::eap::kPEAP, shill::kEapMethodPEAP}, | 316 {::onc::eap::kPEAP, shill::kEapMethodPEAP}, |
316 {::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, | 317 {::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, |
317 {::onc::eap::kEAP_TTLS, shill::kEapMethodTTLS}, | 318 {::onc::eap::kEAP_TTLS, shill::kEapMethodTTLS}, |
318 {::onc::eap::kLEAP, shill::kEapMethodLEAP}, | 319 {::onc::eap::kLEAP, shill::kEapMethodLEAP}, |
319 {NULL}}; | 320 {NULL}}; |
320 | 321 |
321 // Translation of the EAP.Inner field in case of EAP.Outer == PEAP | 322 // Translation of the EAP.Inner field in case of EAP.Outer == PEAP |
322 const StringTranslationEntry kEAP_PEAP_InnerTable[] = { | 323 const StringTranslationEntry kEAP_PEAP_InnerTable[] = { |
| 324 {::onc::eap::kGTC, shill::kEapPhase2AuthPEAPGTC}, |
323 {::onc::eap::kMD5, shill::kEapPhase2AuthPEAPMD5}, | 325 {::onc::eap::kMD5, shill::kEapPhase2AuthPEAPMD5}, |
324 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthPEAPMSCHAPV2}, | 326 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthPEAPMSCHAPV2}, |
325 {::onc::eap::kGTC, shill::kEapPhase2AuthPEAPGTC}, | |
326 {NULL}}; | 327 {NULL}}; |
327 | 328 |
328 // Translation of the EAP.Inner field in case of EAP.Outer == TTLS | 329 // Translation of the EAP.Inner field in case of EAP.Outer == TTLS |
329 const StringTranslationEntry kEAP_TTLS_InnerTable[] = { | 330 const StringTranslationEntry kEAP_TTLS_InnerTable[] = { |
| 331 {::onc::eap::kGTC, shill::kEapPhase2AuthTTLSGTC}, |
330 {::onc::eap::kMD5, shill::kEapPhase2AuthTTLSMD5}, | 332 {::onc::eap::kMD5, shill::kEapPhase2AuthTTLSMD5}, |
| 333 {::onc::eap::kMSCHAP, shill::kEapPhase2AuthTTLSMSCHAP}, |
331 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthTTLSMSCHAPV2}, | 334 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthTTLSMSCHAPV2}, |
332 {::onc::eap::kPAP, shill::kEapPhase2AuthTTLSPAP}, | 335 {::onc::eap::kPAP, shill::kEapPhase2AuthTTLSPAP}, |
333 {::onc::eap::kGTC, shill::kEapPhase2AuthTTLSGTC}, | |
334 {NULL}}; | 336 {NULL}}; |
335 | 337 |
336 const StringTranslationEntry kActivationStateTable[] = { | 338 const StringTranslationEntry kActivationStateTable[] = { |
337 {::onc::cellular::kActivated, shill::kActivationStateActivated}, | 339 {::onc::cellular::kActivated, shill::kActivationStateActivated}, |
338 {::onc::cellular::kActivating, shill::kActivationStateActivating}, | 340 {::onc::cellular::kActivating, shill::kActivationStateActivating}, |
339 {::onc::cellular::kNotActivated, shill::kActivationStateNotActivated}, | 341 {::onc::cellular::kNotActivated, shill::kActivationStateNotActivated}, |
340 {::onc::cellular::kPartiallyActivated, | 342 {::onc::cellular::kPartiallyActivated, |
341 shill::kActivationStatePartiallyActivated}, | 343 shill::kActivationStatePartiallyActivated}, |
342 {NULL}}; | 344 {NULL}}; |
343 | 345 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 continue; | 453 continue; |
452 *onc_value = table[i].onc_value; | 454 *onc_value = table[i].onc_value; |
453 return true; | 455 return true; |
454 } | 456 } |
455 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 457 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
456 return false; | 458 return false; |
457 } | 459 } |
458 | 460 |
459 } // namespace onc | 461 } // namespace onc |
460 } // namespace chromeos | 462 } // namespace chromeos |
OLD | NEW |