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 <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2018-09-27 11:43:58 +03:00 committed by Jouni Malinen
parent 17d4b77472
commit 0fa415a835

View file

@ -94,6 +94,17 @@ def test_suite_b(dev, apdev):
if conf['key_mgmt'] != 'WPA-EAP-SUITE-B': if conf['key_mgmt'] != 'WPA-EAP-SUITE-B':
raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) 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(): def suite_b_as_params():
params = {} params = {}
params['ssid'] = 'as' params['ssid'] = 'as'
@ -205,6 +216,17 @@ def test_suite_b_192(dev, apdev):
if conf['key_mgmt'] != 'WPA-EAP-SUITE-B-192': if conf['key_mgmt'] != 'WPA-EAP-SUITE-B-192':
raise Exception("Unexpected config key_mgmt: " + conf['key_mgmt']) 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): def test_suite_b_192_radius(dev, apdev):
"""WPA2/GCMP-256 (RADIUS) connection at Suite B 192-bit level""" """WPA2/GCMP-256 (RADIUS) connection at Suite B 192-bit level"""
check_suite_b_192_capa(dev) check_suite_b_192_capa(dev)