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

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

Issue 1412283006: Translate 802.1x WEP ("Enterprise WEP") (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 f91950f534e12ab10524246e4ade547b386b820f..c69bb6ea48e21d310e880ebf26056f176576839c 100644
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc
@@ -329,8 +329,21 @@ void ShillToONCTranslator::TranslateVPN() {
}
void ShillToONCTranslator::TranslateWiFiWithState() {
- TranslateWithTableAndSet(shill::kSecurityClassProperty, kWiFiSecurityTable,
- ::onc::wifi::kSecurity);
+ std::string shill_security;
+ std::string shill_key_mgmt;
+ if (shill_dictionary_->GetStringWithoutPathExpansion(
+ shill::kSecurityClassProperty, &shill_security) &&
+ shill_security == shill::kSecurityWep &&
+ shill_dictionary_->GetStringWithoutPathExpansion(
+ shill::kEapKeyMgmtProperty, &shill_key_mgmt) &&
+ shill_key_mgmt == ::onc::wifi::kKeyMgmtIEEE8021X) {
+ onc_object_->SetStringWithoutPathExpansion(::onc::wifi::kSecurity,
+ ::onc::wifi::kWEP_8021X);
+ } else {
+ TranslateWithTableAndSet(shill::kSecurityClassProperty, kWiFiSecurityTable,
+ ::onc::wifi::kSecurity);
+ }
+
bool unknown_encoding = true;
std::string ssid = shill_property_util::GetSSIDFromProperties(
*shill_dictionary_, false /* verbose_logging */, &unknown_encoding);

Powered by Google App Engine
This is Rietveld 408576698