]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE commit message override on hostapd
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 1 Sep 2017 23:04:18 +0000 (02:04 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 4 Sep 2017 10:32:03 +0000 (13:32 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_sae.py

index 7b225fb2ee5f1f2f2ba971718470bf467e54a61e..8eb5e0abc519f40a648de336d2c09e9628fae306 100644 (file)
@@ -744,6 +744,23 @@ def test_sae_reflection_attack_ffc_internal(dev, apdev):
     """SAE reflection attack (FFC) - internal"""
     sae_reflection_attack_internal(apdev[0], dev[0], 5)
 
+@remote_compatible
+def test_sae_commit_override(dev, apdev):
+    """SAE commit override (hostapd)"""
+    if "SAE" not in dev[0].get_capability("auth_alg"):
+        raise HwsimSkip("SAE not supported")
+    params = hostapd.wpa2_params(ssid="test-sae",
+                                 passphrase="12345678")
+    params['wpa_key_mgmt'] = 'SAE'
+    params['sae_commit_override'] = '13ffbad00d215867a7c5ff37d87bb9bdb7cb116e520f71e8d7a794ca2606d537ddc6c099c40e7a25372b80a8fd443cd7dd222c8ea21b8ef372d4b3e316c26a73fd999cc79ad483eb826e7b3893ea332da68fa13224bcdeb4fb18b0584dd100a2c514'
+    hapd = hostapd.add_ap(apdev[0], params)
+    dev[0].request("SET sae_groups ")
+    dev[0].connect("test-sae", psk="test-sae", key_mgmt="SAE",
+                   scan_freq="2412", wait_connect=False)
+    ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
+    if ev is not None:
+        raise Exception("Unexpected connection")
+
 @remote_compatible
 def test_sae_anti_clogging_proto(dev, apdev):
     """SAE anti clogging protocol testing"""