From b102f19bcc53c7f7db3951424d4d46709b4f1986 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 22 May 2021 00:18:57 +0300 Subject: [PATCH] tests: Opportunistic Wireless Encryption - SA Query Signed-off-by: Jouni Malinen --- tests/hwsim/test_owe.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/hwsim/test_owe.py b/tests/hwsim/test_owe.py index 3f29913cf..f72c60682 100644 --- a/tests/hwsim/test_owe.py +++ b/tests/hwsim/test_owe.py @@ -926,3 +926,28 @@ def test_owe_transition_mode_disable(dev, apdev): dev[0].wait_disconnected() dev[0].request("RECONNECT") dev[0].wait_connected() + +def test_owe_sa_query(dev, apdev): + """Opportunistic Wireless Encryption - SA Query""" + if "OWE" not in dev[0].get_capability("key_mgmt"): + raise HwsimSkip("OWE not supported") + params = {"ssid": "owe", + "wpa": "2", + "ieee80211w": "2", + "wpa_key_mgmt": "OWE", + "rsn_pairwise": "CCMP"} + hapd = hostapd.add_ap(apdev[0], params) + bssid = hapd.own_addr() + + dev[0].scan_for_bss(bssid, freq="2412") + dev[0].connect("owe", key_mgmt="OWE", owe_group="19", ieee80211w="2", + scan_freq="2412") + hapd.wait_sta() + + hapd.set("ext_mgmt_frame_handling", "1") + dev[0].request("DISCONNECT") + dev[0].wait_disconnected(timeout=10) + hapd.set("ext_mgmt_frame_handling", "0") + dev[0].request("PMKSA_FLUSH") + dev[0].request("REASSOCIATE") + dev[0].wait_connected(timeout=10, error="Timeout on re-connection")