Index: chromeos/network/onc/onc_translator_shill_to_onc.cc |
diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
index 264df7189db1b1e4336c071094d3cf4a30667339..a6f77bc3ae5bff1b07acc69174a1d14c31f3dc5e 100644 |
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc |
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
@@ -638,14 +638,29 @@ void ShillToONCTranslator::TranslateEap() { |
CopyPropertiesAccordingToSignature(); |
// Translate EAP Outer and Inner values if EAP.EAP exists and is not empty. |
- std::string shill_eap; |
+ std::string shill_eap_method; |
if (shill_dictionary_->GetStringWithoutPathExpansion( |
- shill::kEapMethodProperty, &shill_eap) && |
- !shill_eap.empty()) { |
+ shill::kEapMethodProperty, &shill_eap_method) && |
+ !shill_eap_method.empty()) { |
TranslateWithTableAndSet(shill::kEapMethodProperty, kEAPOuterTable, |
::onc::eap::kOuter); |
- TranslateWithTableAndSet(shill::kEapPhase2AuthProperty, |
- kEAP_TTLS_InnerTable, ::onc::eap::kInner); |
+ std::string shill_phase2_auth; |
+ if (shill_dictionary_->GetStringWithoutPathExpansion( |
+ shill::kEapPhase2AuthProperty, &shill_phase2_auth) && |
+ !shill_phase2_auth.empty()) { |
+ TranslateWithTableAndSet(shill::kEapPhase2AuthProperty, |
+ kEAP_TTLS_InnerTable, ::onc::eap::kInner); |
+ } |
+ } |
+ |
+ std::string shill_cert_id; |
+ if (shill_dictionary_->GetStringWithoutPathExpansion( |
+ shill::kEapCertIdProperty, &shill_cert_id)) { |
+ // Note: shill::kEapKeyIdProperty == shill::kEapCertIdProperty. |
+ onc_object_->SetStringWithoutPathExpansion( |
+ ::onc::client_cert::kClientCertType, ::onc::client_cert::kPKCS11Id); |
+ onc_object_->SetStringWithoutPathExpansion( |
+ ::onc::client_cert::kClientCertPKCS11Id, shill_cert_id); |
} |
} |