| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 312 |
| 312 const StringTranslationEntry kEAPOuterTable[] = { | 313 const StringTranslationEntry kEAPOuterTable[] = { |
| 313 {::onc::eap::kPEAP, shill::kEapMethodPEAP}, | 314 {::onc::eap::kPEAP, shill::kEapMethodPEAP}, |
| 314 {::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, | 315 {::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, |
| 315 {::onc::eap::kEAP_TTLS, shill::kEapMethodTTLS}, | 316 {::onc::eap::kEAP_TTLS, shill::kEapMethodTTLS}, |
| 316 {::onc::eap::kLEAP, shill::kEapMethodLEAP}, | 317 {::onc::eap::kLEAP, shill::kEapMethodLEAP}, |
| 317 {NULL}}; | 318 {NULL}}; |
| 318 | 319 |
| 319 // Translation of the EAP.Inner field in case of EAP.Outer == PEAP | 320 // Translation of the EAP.Inner field in case of EAP.Outer == PEAP |
| 320 const StringTranslationEntry kEAP_PEAP_InnerTable[] = { | 321 const StringTranslationEntry kEAP_PEAP_InnerTable[] = { |
| 322 {::onc::eap::kGTC, shill::kEapPhase2AuthPEAPGTC}, |
| 321 {::onc::eap::kMD5, shill::kEapPhase2AuthPEAPMD5}, | 323 {::onc::eap::kMD5, shill::kEapPhase2AuthPEAPMD5}, |
| 322 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthPEAPMSCHAPV2}, | 324 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthPEAPMSCHAPV2}, |
| 323 {::onc::eap::kGTC, shill::kEapPhase2AuthPEAPGTC}, | |
| 324 {NULL}}; | 325 {NULL}}; |
| 325 | 326 |
| 326 // Translation of the EAP.Inner field in case of EAP.Outer == TTLS | 327 // Translation of the EAP.Inner field in case of EAP.Outer == TTLS |
| 327 const StringTranslationEntry kEAP_TTLS_InnerTable[] = { | 328 const StringTranslationEntry kEAP_TTLS_InnerTable[] = { |
| 329 {::onc::eap::kGTC, shill::kEapPhase2AuthTTLSGTC}, |
| 328 {::onc::eap::kMD5, shill::kEapPhase2AuthTTLSMD5}, | 330 {::onc::eap::kMD5, shill::kEapPhase2AuthTTLSMD5}, |
| 331 {::onc::eap::kMSCHAP, shill::kEapPhase2AuthTTLSMSCHAP}, |
| 329 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthTTLSMSCHAPV2}, | 332 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthTTLSMSCHAPV2}, |
| 330 {::onc::eap::kPAP, shill::kEapPhase2AuthTTLSPAP}, | 333 {::onc::eap::kPAP, shill::kEapPhase2AuthTTLSPAP}, |
| 331 {::onc::eap::kGTC, shill::kEapPhase2AuthTTLSGTC}, | |
| 332 {NULL}}; | 334 {NULL}}; |
| 333 | 335 |
| 334 const StringTranslationEntry kActivationStateTable[] = { | 336 const StringTranslationEntry kActivationStateTable[] = { |
| 335 {::onc::cellular::kActivated, shill::kActivationStateActivated}, | 337 {::onc::cellular::kActivated, shill::kActivationStateActivated}, |
| 336 {::onc::cellular::kActivating, shill::kActivationStateActivating}, | 338 {::onc::cellular::kActivating, shill::kActivationStateActivating}, |
| 337 {::onc::cellular::kNotActivated, shill::kActivationStateNotActivated}, | 339 {::onc::cellular::kNotActivated, shill::kActivationStateNotActivated}, |
| 338 {::onc::cellular::kPartiallyActivated, | 340 {::onc::cellular::kPartiallyActivated, |
| 339 shill::kActivationStatePartiallyActivated}, | 341 shill::kActivationStatePartiallyActivated}, |
| 340 {NULL}}; | 342 {NULL}}; |
| 341 | 343 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 continue; | 451 continue; |
| 450 *onc_value = table[i].onc_value; | 452 *onc_value = table[i].onc_value; |
| 451 return true; | 453 return true; |
| 452 } | 454 } |
| 453 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 455 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
| 454 return false; | 456 return false; |
| 455 } | 457 } |
| 456 | 458 |
| 457 } // namespace onc | 459 } // namespace onc |
| 458 } // namespace chromeos | 460 } // namespace chromeos |
| OLD | NEW |