aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-12-07 12:00:23 (GMT)
committerJouni Malinen <j@w1.fi>2019-12-07 12:00:23 (GMT)
commit49ac2466c3008d6113fc759efa4b91f21f30b758 (patch)
treea2ef1ad6845c2648552dd6737168b87ca8856cfa
parent250db2ab518b362b896ff4f4b7fd7222c152fe3a (diff)
downloadhostap-49ac2466c3008d6113fc759efa4b91f21f30b758.zip
hostap-49ac2466c3008d6113fc759efa4b91f21f30b758.tar.gz
hostap-49ac2466c3008d6113fc759efa4b91f21f30b758.tar.bz2
tests: sigma_dut controlled SAE H2E misbehavior with RSNXE
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_sigma_dut.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py
index 9d6c57e..b5a28f9 100644
--- a/tests/hwsim/test_sigma_dut.py
+++ b/tests/hwsim/test_sigma_dut.py
@@ -3531,3 +3531,33 @@ def test_sigma_dut_sae_h2e_enabled_group_rejected(dev, apdev):
raise Exception("Unexpected connection reported")
finally:
stop_sigma_dut(sigma)
+
+def test_sigma_dut_sae_h2e_rsnxe_mismatch(dev, apdev):
+ """sigma_dut controlled SAE H2E misbehavior with RSNXE"""
+ if "SAE" not in dev[0].get_capability("auth_alg"):
+ raise HwsimSkip("SAE not supported")
+
+ ssid = "test-sae"
+ params = hostapd.wpa2_params(ssid=ssid, passphrase="12345678")
+ params['wpa_key_mgmt'] = 'SAE'
+ params["ieee80211w"] = "2"
+ params['sae_groups'] = "19"
+ params['sae_pwe'] = '1'
+ hapd = hostapd.add_ap(apdev[0], params)
+
+ ifname = dev[0].ifname
+ try:
+ sigma = start_sigma_dut(ifname, sae_h2e=True)
+
+ sigma_dut_cmd_check("sta_reset_default,interface,%s" % 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,%s,passphrase,%s,type,SAE,encpType,aes-ccmp,keymgmttype,wpa2,RSNXE_Content,EapolM2:F40100" % (ifname, "test-sae", "12345678"))
+ sigma_dut_cmd_check("sta_associate,interface,%s,ssid,%s,channel,1" % (ifname, "test-sae"))
+ ev = dev[0].wait_event(["SME: Trying to authenticate with"], timeout=10)
+ if ev is None:
+ raise Exception("No authentication attempt reported")
+ ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=0.5)
+ if ev is not None:
+ raise Exception("Unexpected connection reported")
+ finally:
+ stop_sigma_dut(sigma)