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

Unified Diff: chromeos/network/onc/onc_translator_onc_to_shill.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
« no previous file with comments | « chromeos/network/onc/onc_translation_tables.cc ('k') | chromeos/network/onc/onc_translator_shill_to_onc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_translator_onc_to_shill.cc
diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc
index f373f977094ff0be008a693041958e1271d59188..8a340554ba9f554431fc6b3bb8b06eb40e9095cb 100644
--- a/chromeos/network/onc/onc_translator_onc_to_shill.cc
+++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc
@@ -18,6 +18,7 @@
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/values.h"
+#include "chromeos/network/client_cert_util.h"
#include "chromeos/network/onc/onc_signature.h"
#include "chromeos/network/onc/onc_translation_tables.h"
#include "chromeos/network/onc/onc_translator.h"
@@ -262,6 +263,21 @@ void LocalTranslator::TranslateEAP() {
}
}
+ std::string cert_type;
+ onc_object_->GetStringWithoutPathExpansion(
+ ::onc::client_cert::kClientCertType, &cert_type);
+ if (cert_type == ::onc::client_cert::kPKCS11Id) {
+ std::string pkcs11_id;
+ onc_object_->GetStringWithoutPathExpansion(
+ ::onc::client_cert::kClientCertPKCS11Id, &pkcs11_id);
+ shill_dictionary_->SetStringWithoutPathExpansion(
+ shill::kEapPinProperty, chromeos::client_cert::kDefaultTPMPin);
+ shill_dictionary_->SetStringWithoutPathExpansion(shill::kEapCertIdProperty,
+ pkcs11_id);
+ shill_dictionary_->SetStringWithoutPathExpansion(shill::kEapKeyIdProperty,
+ pkcs11_id);
+ }
+
CopyFieldsAccordingToSignature();
}
« no previous file with comments | « chromeos/network/onc/onc_translation_tables.cc ('k') | chromeos/network/onc/onc_translator_shill_to_onc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698