shill: add support for connecting to RSN networks
BUG=chromium-os:20897
TEST=unittests and some autotests
the following autotests now pass, at least in the wifi_vm_config:
- network_WiFiManager.000_SSID_Length_Limit
- network_WiFiManager.021CheckWPA_BadPassphraseLength
- network_WiFiSecMat.010CheckWPA_TKIP
* network_WiFiSecMat.011CheckWPA_AES
- network_WiFiSecMat.012CheckWPA_Multi
* network_WiFiSecMat.013CheckWPA_Mixed
* network_WiFiSecMat.015CheckWPA_PTK_Rekey
* network_WiFiSecMat.016CheckWPA_GTK_Rekey
- network_WiFiSecMat.018CheckWPA_CounterMeasures
* network_WiFiSecMat.020CheckRSN
'*' denotes a newly passing test
Change-Id: I5ed6e7267fa2ee26c4e76a53a935b0662865f962
Reviewed-on: http://gerrit.chromium.org/gerrit/8709
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/wifi_service.cc b/wifi_service.cc
index 861e969..daeb80f 100644
--- a/wifi_service.cc
+++ b/wifi_service.cc
@@ -139,7 +139,10 @@
} else if (security_ == flimflam::kSecurityPsk) {
NOTIMPLEMENTED();
} else if (security_ == flimflam::kSecurityRsn) {
- NOTIMPLEMENTED();
+ params[wpa_supplicant::kPropertySecurityProtocol].writer().
+ append_string(wpa_supplicant::kSecurityModeRSN);
+ params[wpa_supplicant::kPropertyPreSharedKey].writer().
+ append_string(passphrase_.c_str());
} else if (security_ == flimflam::kSecurityWpa) {
params[wpa_supplicant::kPropertySecurityProtocol].writer().
append_string(wpa_supplicant::kSecurityModeWPA);