diff options
author | Jouni Malinen <j@w1.fi> | 2018-12-02 14:08:29 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2018-12-02 16:40:06 (GMT) |
commit | d0e88871a774bcb61df7d5514a78f6d484f5c270 (patch) | |
tree | 7a840ac295b107d3ef7fd20830be79c0e48ebf7c /tests | |
parent | 24c4200d2ee5ff9cadbe29c1958d4921725e0e6d (diff) | |
download | hostap-d0e88871a774bcb61df7d5514a78f6d484f5c270.zip hostap-d0e88871a774bcb61df7d5514a78f6d484f5c270.tar.gz hostap-d0e88871a774bcb61df7d5514a78f6d484f5c270.tar.bz2 |
tests: DPP and unknown configurator id
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hwsim/test_dpp.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/hwsim/test_dpp.py b/tests/hwsim/test_dpp.py index de838e7..d0aa38e 100644 --- a/tests/hwsim/test_dpp.py +++ b/tests/hwsim/test_dpp.py @@ -5681,3 +5681,22 @@ def test_dpp_peer_intro_local_failures(dev, apdev): raise Exception("No TX status reported") dev[0].request("REMOVE_NETWORK all") dev[0].dump_monitor() + +def run_dpp_configurator_id_unknown(dev): + check_dpp_capab(dev) + res = dev.request("DPP_CONFIGURATOR_ADD") + if "FAIL" in res: + raise Exception("Failed to add configurator") + conf_id = int(res) + if "FAIL" not in dev.request("DPP_CONFIGURATOR_GET_KEY %d" % (conf_id + 1)): + raise Exception("DPP_CONFIGURATOR_GET_KEY with incorrect id accepted") + + cmd = "DPP_CONFIGURATOR_SIGN conf=sta-dpp configurator=%d" % (conf_id + 1) + if "FAIL" not in dev.request(cmd): + raise Exception("DPP_CONFIGURATOR_SIGN with incorrect id accepted") + +def test_dpp_configurator_id_unknown(dev, apdev): + """DPP and unknown configurator id""" + run_dpp_configurator_id_unknown(dev[0]) + hapd = hostapd.add_ap(apdev[0], { "ssid": "unconfigured" }) + run_dpp_configurator_id_unknown(hapd) |