From 4b2d2098241d25b09943d3189552d0a8a55bc683 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 11 May 2014 18:39:54 +0300 Subject: [PATCH] tests: EAP-pwd with invalid group This could result in wpa_supplicant segmentation fault prior to the EAP-pwd fix for error case handling. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_eap.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 54f00ffab..7a12da347 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -951,6 +951,20 @@ def test_ap_wpa2_eap_pwd_groups(dev, apdev): dev[0].request("REMOVE_NETWORK all") eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret password") +def test_ap_wpa2_eap_pwd_invalid_group(dev, apdev): + """WPA2-Enterprise connection using invalid EAP-pwd group""" + params = { "ssid": "test-wpa2-eap", "wpa": "2", "wpa_key_mgmt": "WPA-EAP", + "rsn_pairwise": "CCMP", "ieee8021x": "1", + "eap_server": "1", "eap_user_file": "auth_serv/eap_user.conf" } + params['pwd_group'] = "0" + hostapd.add_ap(apdev[0]['ifname'], params) + dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="PWD", + identity="pwd user", password="secret password", + scan_freq="2412", wait_connect=False) + ev = dev[0].wait_event(["CTRL-EVENT-EAP-FAILURE"]) + if ev is None: + raise Exception("Timeout on EAP failure report") + def test_ap_wpa2_eap_gpsk(dev, apdev): """WPA2-Enterprise connection using EAP-GPSK""" params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")