From 295170851df780fbfd4d2878807422e052348b11 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 14 Jul 2021 13:04:13 +0300 Subject: [PATCH] tests: SAE Authetication failure reporting Signed-off-by: Jouni Malinen --- tests/hwsim/test_sae.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index 159678e0c..9925d98f3 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -2775,3 +2775,19 @@ def test_sae_ocv_pmk_failure(dev, apdev): raise Exception("hostapd did not report correct PMK after disconnection") if pmk_w2 != pmk_w: raise Exception("wpa_supplicant did not report correct PMK after disconnection") + +def test_sae_reject(dev, apdev): + """SAE and AP rejecting connection""" + check_sae_capab(dev[0]) + params = hostapd.wpa2_params(ssid="test-sae", + passphrase="12345678") + params['wpa_key_mgmt'] = 'SAE' + params['max_num_sta'] = '0' + hapd = hostapd.add_ap(apdev[0], params) + dev[0].set("sae_groups", "") + id = dev[0].connect("test-sae", psk="12345678", key_mgmt="SAE", + scan_freq="2412", wait_connect=False) + if not dev[0].wait_event(["CTRL-EVENT-AUTH-REJECT"], timeout=10): + raise Exception("Authentication rejection not reported") + dev[0].request("REMOVE_NETWORK all") + dev[0].dump_monitor()