Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: chromeos/network/onc/onc_translator_shill_to_onc.cc

Issue 2891453002: Introduce networkingPrivate.getCertificateLists (Closed)
Patch Set: Clang format Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}
« no previous file with comments | « chromeos/network/onc/onc_translator_onc_to_shill.cc ('k') | chromeos/network/onc/onc_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698