From 62d561615599538faa30f0006f83b80f237c13ef Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 3 Apr 2020 12:45:03 +0300 Subject: [PATCH] tests: DPP netAccessKey for reconfig Signed-off-by: Jouni Malinen --- tests/hwsim/test_dpp.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index ff1ed6b79..7c5536515 100644 --- a/tests/hwsim/test_dpp.py +++ b/tests/hwsim/test_dpp.py @@ -5285,6 +5285,13 @@ def run_dpp_reconfig_connector(dev, apdev): p = ev.split(' ') csign = p[1] + ev = dev[0].wait_event(["DPP-NET-ACCESS-KEY"], timeout=1) + if ev is None: + raise Exception("netAccessKey not reported") + p = ev.split(' ') + net_access_key = p[1] + net_access_key_expiry = p[2] if len(p) > 2 else None + ev = dev[0].wait_event(["DPP-NETWORK-ID"], timeout=1) if ev is None: raise Exception("DPP network profile not generated") @@ -5301,3 +5308,7 @@ def run_dpp_reconfig_connector(dev, apdev): n_csign = dev[0].get_network(id, "dpp_csign") if n_csign.strip('"') != csign: raise Exception("csign mismatch: %s %s" % (n_csign, csign)) + n_net_access_key = dev[0].get_network(id, "dpp_netaccesskey") + if n_net_access_key.strip('"') != net_access_key: + raise Exception("net_access_key mismatch: %s %s" % (n_net_access_key, + net_access_key))