]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: sigma_dut OWE with invalid DH Param element
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 10 Oct 2017 15:35:19 +0000 (18:35 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 10 Oct 2017 15:35:19 +0000 (18:35 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_sigma_dut.py

index 3df3ef4598c49d301d9c9232b16abaa6b7ed7da0..ead4ccdfe139c625199200a4c081036543917b29 100644 (file)
@@ -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: