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

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 415483002: Pass slot id to Shill for manually configured WiFi with EAP-TLS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/options/cert_library.cc ('k') | chromeos/network/client_cert_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/chromeos/options/wifi_config_view.h" 5 #include "chrome/browser/chromeos/options/wifi_config_view.h"
6 6
7 #include "ash/system/chromeos/network/network_connect.h" 7 #include "ash/system/chromeos/network/network_connect.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 12 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
13 #include "chrome/browser/chromeos/net/onc_utils.h" 13 #include "chrome/browser/chromeos/net/onc_utils.h"
14 #include "chrome/browser/chromeos/options/passphrase_textfield.h" 14 #include "chrome/browser/chromeos/options/passphrase_textfield.h"
15 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chromeos/login/login_state.h" 16 #include "chromeos/login/login_state.h"
17 #include "chromeos/network/client_cert_util.h"
17 #include "chromeos/network/network_configuration_handler.h" 18 #include "chromeos/network/network_configuration_handler.h"
18 #include "chromeos/network/network_event_log.h" 19 #include "chromeos/network/network_event_log.h"
19 #include "chromeos/network/network_handler.h" 20 #include "chromeos/network/network_handler.h"
20 #include "chromeos/network/network_state.h" 21 #include "chromeos/network/network_state.h"
21 #include "chromeos/network/network_state_handler.h" 22 #include "chromeos/network/network_state_handler.h"
22 #include "chromeos/network/network_ui_data.h" 23 #include "chromeos/network/network_ui_data.h"
23 #include "chromeos/network/shill_property_util.h" 24 #include "chromeos/network/shill_property_util.h"
24 #include "chromeos/tpm_token_loader.h" 25 #include "chromeos/tpm_token_loader.h"
25 #include "components/onc/onc_constants.h" 26 #include "components/onc/onc_constants.h"
26 #include "grit/chromium_strings.h" 27 #include "grit/chromium_strings.h"
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 shill::kEapIdentityProperty, GetEapIdentity()); 866 shill::kEapIdentityProperty, GetEapIdentity());
866 properties->SetStringWithoutPathExpansion( 867 properties->SetStringWithoutPathExpansion(
867 shill::kEapMethodProperty, GetEapMethod()); 868 shill::kEapMethodProperty, GetEapMethod());
868 properties->SetStringWithoutPathExpansion( 869 properties->SetStringWithoutPathExpansion(
869 shill::kEapPhase2AuthProperty, GetEapPhase2Auth()); 870 shill::kEapPhase2AuthProperty, GetEapPhase2Auth());
870 properties->SetStringWithoutPathExpansion( 871 properties->SetStringWithoutPathExpansion(
871 shill::kEapAnonymousIdentityProperty, GetEapAnonymousIdentity()); 872 shill::kEapAnonymousIdentityProperty, GetEapAnonymousIdentity());
872 properties->SetStringWithoutPathExpansion( 873 properties->SetStringWithoutPathExpansion(
873 shill::kEapSubjectMatchProperty, GetEapSubjectMatch()); 874 shill::kEapSubjectMatchProperty, GetEapSubjectMatch());
874 875
875 // shill requires both CertID and KeyID for TLS connections, despite 876 const std::string pkcs11id = GetEapClientCertPkcs11Id();
876 // the fact that by convention they are the same ID. 877 client_cert::SetShillProperties(client_cert::CONFIG_TYPE_EAP,
877 properties->SetStringWithoutPathExpansion( 878 CertLibrary::Get()->GetTPMSlotID(),
878 shill::kEapCertIdProperty, GetEapClientCertPkcs11Id()); 879 TPMTokenLoader::Get()->tpm_user_pin(),
879 properties->SetStringWithoutPathExpansion( 880 &pkcs11id,
880 shill::kEapKeyIdProperty, GetEapClientCertPkcs11Id()); 881 properties);
881 882
882 properties->SetBooleanWithoutPathExpansion( 883 properties->SetBooleanWithoutPathExpansion(
883 shill::kEapUseSystemCasProperty, GetEapUseSystemCas()); 884 shill::kEapUseSystemCasProperty, GetEapUseSystemCas());
884 properties->SetStringWithoutPathExpansion( 885 properties->SetStringWithoutPathExpansion(
885 shill::kEapPasswordProperty, GetPassphrase()); 886 shill::kEapPasswordProperty, GetPassphrase());
886 887
887 base::ListValue* pem_list = new base::ListValue; 888 base::ListValue* pem_list = new base::ListValue;
888 pem_list->AppendString(GetEapServerCaCertPEM()); 889 pem_list->AppendString(GetEapServerCaCertPEM());
889 properties->SetWithoutPathExpansion( 890 properties->SetWithoutPathExpansion(
890 shill::kEapCaCertPemProperty, pem_list); 891 shill::kEapCaCertPemProperty, pem_list);
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, 1375 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data,
1375 const NetworkState* network, 1376 const NetworkState* network,
1376 const std::string& key) { 1377 const std::string& key) {
1377 std::string onc_tag = network->type() == shill::kTypeEthernet 1378 std::string onc_tag = network->type() == shill::kTypeEthernet
1378 ? ::onc::ethernet::kEAP 1379 ? ::onc::ethernet::kEAP
1379 : ::onc::wifi::kEAP; 1380 : ::onc::wifi::kEAP;
1380 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); 1381 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key);
1381 } 1382 }
1382 1383
1383 } // namespace chromeos 1384 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/cert_library.cc ('k') | chromeos/network/client_cert_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698