From e30de6c2506f034ce709c1bdbae4d2fcabeed041 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 10 Oct 2017 18:35:19 +0300 Subject: [PATCH] tests: sigma_dut OWE with invalid DH Param element Signed-off-by: Jouni Malinen --- tests/hwsim/test_sigma_dut.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py index 3df3ef459..ead4ccdfe 100644 --- a/tests/hwsim/test_sigma_dut.py +++ b/tests/hwsim/test_sigma_dut.py @@ -628,6 +628,20 @@ def run_sigma_dut_owe(dev, apdev): sigma_dut_cmd_check("sta_associate,interface,%s,ssid,owe,channel,1" % ifname) sigma_dut_wait_connected(ifname) sigma_dut_cmd_check("sta_get_ip_config,interface," + ifname) + sigma_dut_cmd_check("sta_disconnect,interface," + ifname) + dev[0].wait_disconnected() + dev[0].dump_monitor() + + sigma_dut_cmd_check("sta_reset_default,interface,%s,prog,WPA3" % ifname) + sigma_dut_cmd_check("sta_set_ip_config,interface,%s,dhcp,0,ip,127.0.0.11,mask,255.255.255.0" % ifname) + sigma_dut_cmd_check("sta_set_security,interface,%s,ssid,owe,Type,OWE,ECGroupID,0" % ifname) + sigma_dut_cmd_check("sta_associate,interface,%s,ssid,owe,channel,1" % ifname) + ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10) + sigma_dut_cmd_check("sta_disconnect,interface," + ifname) + if ev is None: + raise Exception("Association not rejected") + if "status_code=77" not in ev: + raise Exception("Unexpected rejection reason: " + ev) sigma_dut_cmd_check("sta_reset_default,interface," + ifname) finally: