]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SAE group negotiation (no match)
authorJouni Malinen <jouni@codeaurora.org>
Mon, 11 Mar 2019 13:41:27 +0000 (15:41 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 11 Mar 2019 22:25:48 +0000 (00:25 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_sae.py

index 48997594342a787f103187b158f990d3c2b4999a..c8e06c7e2a94522f9d1a2f4d18a463bded1f3d37 100644 (file)
@@ -203,6 +203,25 @@ def test_sae_group_nego(dev, apdev):
     if dev[0].get_status_field('sae_group') != '19':
         raise Exception("Expected SAE group not used")
 
+def test_sae_group_nego_no_match(dev, apdev):
+    """SAE group negotiation (no match)"""
+    if "SAE" not in dev[0].get_capability("auth_alg"):
+        raise HwsimSkip("SAE not supported")
+    params = hostapd.wpa2_params(ssid="test-sae-group-nego",
+                                 passphrase="12345678")
+    params['wpa_key_mgmt'] = 'SAE'
+    # None-existing SAE group to force all attempts to be rejected
+    params['sae_groups'] = '0'
+    hostapd.add_ap(apdev[0], params)
+
+    dev[0].request("SET sae_groups ")
+    dev[0].connect("test-sae-group-nego", psk="12345678", key_mgmt="SAE",
+                   scan_freq="2412", wait_connect=False)
+    ev = dev[0].wait_event([ "CTRL-EVENT-SSID-TEMP-DISABLED" ], timeout=10)
+    dev[0].request("REMOVE_NETWORK all")
+    if ev is None:
+        raise Exception("Network profile disabling not reported")
+
 @remote_compatible
 def test_sae_anti_clogging(dev, apdev):
     """SAE anti clogging"""