aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-08-11 13:45:43 (GMT)
committerJouni Malinen <j@w1.fi>2019-08-11 13:45:43 (GMT)
commitba2d5f3642fd97661d90357f00577b77b1368eb7 (patch)
treedded0073b2c4c5783450ed788a9e1b4bc5615306
parented98d4d719b6cabab618466fa4b6d7e974e32135 (diff)
downloadhostap-ba2d5f3642fd97661d90357f00577b77b1368eb7.zip
hostap-ba2d5f3642fd97661d90357f00577b77b1368eb7.tar.gz
hostap-ba2d5f3642fd97661d90357f00577b77b1368eb7.tar.bz2
tests: DPP network introduction with expired netaccesskey
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_dpp.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py
index d6cf921..884c1a9 100644
--- a/tests/hwsim/test_dpp.py
+++ b/tests/hwsim/test_dpp.py
@@ -1441,6 +1441,47 @@ def test_dpp_network_introduction(dev, apdev):
if val != "DPP":
raise Exception("Unexpected key_mgmt: " + val)
+def test_dpp_network_introduction_expired(dev, apdev):
+ """DPP network introduction with expired netaccesskey"""
+ check_dpp_capab(dev[0])
+ check_dpp_capab(dev[1])
+
+ params = {"ssid": "dpp",
+ "wpa": "2",
+ "wpa_key_mgmt": "DPP",
+ "ieee80211w": "2",
+ "rsn_pairwise": "CCMP",
+ "dpp_connector": params1_ap_connector,
+ "dpp_csign": params1_csign,
+ "dpp_netaccesskey": params1_ap_netaccesskey,
+ "dpp_netaccesskey_expiry": "1565530889"}
+ try:
+ hapd = hostapd.add_ap(apdev[0], params)
+ except:
+ raise HwsimSkip("DPP not supported")
+
+ dev[0].connect("dpp", key_mgmt="DPP", scan_freq="2412",
+ ieee80211w="2",
+ dpp_csign=params1_csign,
+ dpp_connector=params1_sta_connector,
+ dpp_netaccesskey=params1_sta_netaccesskey,
+ wait_connect=False)
+ ev = hapd.wait_event(["DPP-RX"], timeout=10)
+ if ev is None:
+ raise Exception("No DPP Peer Discovery Request seen")
+ if "type=5" not in ev:
+ raise Exception("Unexpected DPP message received: " + ev)
+ ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
+ dev[0].request("DISCONNECT")
+ if ev:
+ raise Exception("Connection reported")
+
+ hapd.disable()
+ hapd.set("dpp_netaccesskey_expiry", "2565530889")
+ hapd.enable()
+ dev[0].request("RECONNECT")
+ dev[0].wait_connected()
+
def test_dpp_and_sae_akm(dev, apdev):
"""DPP and SAE AKMs"""
check_dpp_capab(dev[0])