From 29b508e7dc7df01cf99474afcd36d3cbba281db9 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 2 Mar 2016 17:11:38 +0200 Subject: [PATCH] tests: WPA2-Enterprise with EAP-GPSK and PTK rekey enforced by AP Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_eap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index 59c4ba153..20bc68977 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -5859,3 +5859,15 @@ def test_ap_wpa2_eap_status(dev, apdev): dev[0].wait_connected() dev[0].request("REMOVE_NETWORK all") dev[0].wait_disconnected() + +def test_ap_wpa2_eap_gpsk_ptk_rekey_ap(dev, apdev): + """WPA2-Enterprise with EAP-GPSK and PTK rekey enforced by AP""" + params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap") + params['wpa_ptk_rekey'] = '2' + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + id = eap_connect(dev[0], apdev[0], "GPSK", "gpsk user", + password="abcdefghijklmnop0123456789abcdef") + ev = dev[0].wait_event(["WPA: Key negotiation completed"]) + if ev is None: + raise Exception("PTK rekey timed out") + hwsim_utils.test_connectivity(dev[0], hapd)