aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-17 19:37:15 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 09:52:58 (GMT)
commit285fd906362485f3446a8d4169f26da9d6a91b4d (patch)
treef5877698b017cb3b3bc430d26a0595ff56dcf5d4 /wpa_supplicant
parent1faadba5238b248934b1f814bc3117201d7c27d6 (diff)
downloadhostap-06-285fd906362485f3446a8d4169f26da9d6a91b4d.zip
hostap-06-285fd906362485f3446a8d4169f26da9d6a91b4d.tar.gz
hostap-06-285fd906362485f3446a8d4169f26da9d6a91b4d.tar.bz2
Fixed WPS credential conversion to wpa_supplicant configuration
Must not set pairwise_cipher/group_cipher for non-WPA/WPA2 networks since the configuration parser is going to reject such values. In addition, should not limit group_cipher to just TKIP or TKIP|CCMP just in case the AP is using WEP as the group cipher. Default group_cipher value can be used for all cases. (cherry picked from commit 7aab82b3fedcd96314799118c893e62de7a9f1e4)
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wps_supplicant.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 9bf764c..8504851 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -87,11 +87,8 @@ static int wpa_supplicant_wps_cred(void *ctx,
switch (cred->encr_type) {
case WPS_ENCR_NONE:
- ssid->pairwise_cipher = ssid->group_cipher = WPA_CIPHER_NONE;
break;
case WPS_ENCR_WEP:
- ssid->pairwise_cipher = ssid->group_cipher =
- WPA_CIPHER_WEP40 | WPA_CIPHER_WEP104;
if (cred->key_len > 0 && cred->key_len <= MAX_WEP_KEY_LEN &&
cred->key_idx < NUM_WEP_KEYS) {
os_memcpy(ssid->wep_key[cred->key_idx], cred->key,
@@ -102,11 +99,9 @@ static int wpa_supplicant_wps_cred(void *ctx,
break;
case WPS_ENCR_TKIP:
ssid->pairwise_cipher = WPA_CIPHER_TKIP;
- ssid->group_cipher = WPA_CIPHER_TKIP;
break;
case WPS_ENCR_AES:
ssid->pairwise_cipher = WPA_CIPHER_CCMP;
- ssid->group_cipher = WPA_CIPHER_CCMP | WPA_CIPHER_TKIP;
break;
}