diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2017-08-14 18:12:33 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2017-08-18 18:10:52 (GMT) |
commit | d33222d1fee4c3d07e6c349adb81907d7400019b (patch) | |
tree | ef95b50b94fc89bc129b07ce07ba2b50395ebd4d /tests | |
parent | ae048257cb78c18b8296ad966314af79c6c0b471 (diff) | |
download | hostap-d33222d1fee4c3d07e6c349adb81907d7400019b.zip hostap-d33222d1fee4c3d07e6c349adb81907d7400019b.tar.gz hostap-d33222d1fee4c3d07e6c349adb81907d7400019b.tar.bz2 |
tests: hostapd with zero length ap_pin parameter
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hwsim/test_ap_wps.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 58baec9..1181664 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -554,6 +554,25 @@ def test_ap_wps_reg_connect(dev, apdev): if status['key_mgmt'] != 'WPA2-PSK': raise Exception("Unexpected key_mgmt") +def test_ap_wps_reg_connect_zero_len_ap_pin(dev, apdev): + """hostapd with zero length ap_pin parameter""" + ssid = "test-wps-reg-ap-pin" + appin = "" + hostapd.add_ap(apdev[0], + { "ssid": ssid, "eap_server": "1", "wps_state": "2", + "wpa_passphrase": "12345678", "wpa": "2", + "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP", + "ap_pin": appin}) + logger.info("WPS provisioning step") + dev[0].dump_monitor() + dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412) + dev[0].wps_reg(apdev[0]['bssid'], appin, no_wait=True) + ev = dev[0].wait_event(["WPS-FAIL"], timeout=15) + if ev is None: + raise Exception("No WPS-FAIL reported") + if "msg=5 config_error=15" not in ev: + raise Exception("Unexpected WPS-FAIL: " + ev) + def test_ap_wps_reg_connect_mixed_mode(dev, apdev): """WPS registrar using AP PIN to connect (WPA+WPA2)""" ssid = "test-wps-reg-ap-pin" |