aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-12-06 22:45:10 (GMT)
committerJouni Malinen <j@w1.fi>2019-12-06 22:45:10 (GMT)
commit90d84bc511eaa6b28f8d55cd913d00261e358ebb (patch)
tree532a88a8f063a25704eb32a14dcae2e702c38b04
parenta889e9a70c7d0ec563dc24df02319194e971979e (diff)
downloadhostap-90d84bc511eaa6b28f8d55cd913d00261e358ebb.zip
hostap-90d84bc511eaa6b28f8d55cd913d00261e358ebb.tar.gz
hostap-90d84bc511eaa6b28f8d55cd913d00261e358ebb.tar.bz2
tests: SAE H2E and rejected groups indication (unexpected group)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--tests/hwsim/test_sae.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py
index 95bf43f..386bcbb 100644
--- a/tests/hwsim/test_sae.py
+++ b/tests/hwsim/test_sae.py
@@ -2024,6 +2024,30 @@ def test_sae_h2e_rejected_groups(dev, apdev):
dev[0].set("sae_groups", "")
dev[0].set("sae_pwe", "0")
+def test_sae_h2e_rejected_groups_unexpected(dev, apdev):
+ """SAE H2E and rejected groups indication (unexpected group)"""
+ params = hostapd.wpa2_params(ssid="sae-pwe", passphrase="12345678")
+ params['wpa_key_mgmt'] = 'SAE'
+ params['sae_groups'] = "19 20"
+ params['sae_pwe'] = "1"
+ hapd = hostapd.add_ap(apdev[0], params)
+ try:
+ dev[0].set("sae_groups", "21 19")
+ dev[0].set("extra_sae_rejected_groups", "19")
+ dev[0].set("sae_pwe", "1")
+ dev[0].connect("sae-pwe", psk="12345678", key_mgmt="SAE",
+ scan_freq="2412", wait_connect=False)
+ ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED",
+ "CTRL-EVENT-SSID-TEMP-DISABLED"], timeout=10)
+ dev[0].request("DISCONNECT")
+ if ev is None:
+ raise Exception("No indication of temporary disabled network seen")
+ if "CTRL-EVENT-CONNECTED" in ev:
+ raise Exception("Unexpected connection")
+ finally:
+ dev[0].set("sae_groups", "")
+ dev[0].set("sae_pwe", "0")
+
def test_sae_h2e_password_id(dev, apdev):
"""SAE H2E and password identifier"""
if "SAE" not in dev[0].get_capability("auth_alg"):