]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE dot11RSNASAESync
authorJouni Malinen <j@w1.fi>
Sun, 11 Aug 2019 13:34:41 +0000 (16:34 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 Aug 2019 13:37:48 +0000 (16:37 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_sae.py

index 69d1c9a7745c2f1180b9bebca4493c13f85017a8..8ebf7d16386d45a1152eeabfaad31a50bc5873c0 100644 (file)
@@ -1662,3 +1662,26 @@ def run_sae_anti_clogging_during_attack(dev, apdev):
         raise Exception("Real station(1) did not get connected")
     if count < 1:
         raise Exception("Too few token responses in third round: %d" % count)
+
+def test_sae_sync(dev, apdev):
+    """SAE dot11RSNASAESync"""
+    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_sync'] = '1'
+    hostapd.add_ap(apdev[0], params)
+
+    # TODO: More complete dot11RSNASAESync testing. For now, this is really only
+    # checking that sae_sync config parameter is accepted.
+    dev[0].request("SET sae_groups ")
+    dev[1].request("SET sae_groups ")
+    id = {}
+    for i in range(0, 2):
+        dev[i].scan(freq="2412")
+        id[i] = dev[i].connect("test-sae", psk="12345678", key_mgmt="SAE",
+                               scan_freq="2412", only_add_network=True)
+    for i in range(0, 2):
+        dev[i].select_network(id[i])
+    for i in range(0, 2):
+        dev[i].wait_connected(timeout=10)