From 0fa415a8355c9454f4d360a19073283349f99c3e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 27 Sep 2018 11:43:58 +0300 Subject: [PATCH] tests: Suite B and PMKSA caching multiple times This verifies that wpa_supplicant and hostapd behave consistently with PMKSA caching when Suite B AKMs end up deriving a new PMKID from each 4-way handshake. Signed-off-by: Jouni Malinen --- tests/hwsim/test_suite_b.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/hwsim/test_suite_b.py b/tests/hwsim/test_suite_b.py index db2cac7e0..762e7e3f2 100644 --- a/tests/hwsim/test_suite_b.py +++ b/tests/hwsim/test_suite_b.py @@ -94,6 +94,17 @@ def test_suite_b(dev, apdev): if conf['key_mgmt'] != 'WPA-EAP-SUITE-B': raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) + dev[0].request("DISCONNECT") + dev[0].wait_disconnected(timeout=20) + dev[0].dump_monitor() + dev[0].request("RECONNECT") + ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED", + "CTRL-EVENT-CONNECTED"], timeout=20) + if ev is None: + raise Exception("Roaming with the AP timed out (2)") + if "CTRL-EVENT-EAP-STARTED" in ev: + raise Exception("Unexpected EAP exchange (2)") + def suite_b_as_params(): params = {} params['ssid'] = 'as' @@ -205,6 +216,17 @@ def test_suite_b_192(dev, apdev): if conf['key_mgmt'] != 'WPA-EAP-SUITE-B-192': raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) + dev[0].request("DISCONNECT") + dev[0].wait_disconnected(timeout=20) + dev[0].dump_monitor() + dev[0].request("RECONNECT") + ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED", + "CTRL-EVENT-CONNECTED"], timeout=20) + if ev is None: + raise Exception("Roaming with the AP timed out (2)") + if "CTRL-EVENT-EAP-STARTED" in ev: + raise Exception("Unexpected EAP exchange (2)") + def test_suite_b_192_radius(dev, apdev): """WPA2/GCMP-256 (RADIUS) connection at Suite B 192-bit level""" check_suite_b_192_capa(dev)