From aa8ea7abc98c3ee267e15c553f2619d76b726686 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 10 Aug 2019 18:45:37 +0300 Subject: [PATCH] tests: Additional dpp_controller parsing coverage Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/hwsim/test_ap_config.py b/tests/hwsim/test_ap_config.py index a1b80aa48..d0abaeef1 100644 --- a/tests/hwsim/test_ap_config.py +++ b/tests/hwsim/test_ap_config.py @@ -326,6 +326,10 @@ def test_ap_config_invalid_value(dev, apdev, params): ("venue_url", "foo"), ("venue_url", "1:" + 255*"a"), ("sae_password", "secret|mac=qq"), + ("dpp_controller", "ipaddr=1"), + ("dpp_controller", "ipaddr=127.0.0.1 pkhash=q"), + ("dpp_controller", "ipaddr=127.0.0.1 pkhash=" + 32*"qq"), + ("dpp_controller", "pkhash=" + 32*"aa"), ("unknown-item", "foo")] for field, val in tests: if "FAIL" not in hapd.request("SET %s %s" % (field, val)): @@ -438,6 +442,7 @@ def test_ap_config_set_oom(dev, apdev): (2, "parse_sae_password", "SET sae_password secret"), (2, "parse_sae_password", "SET sae_password secret|id=pw"), (3, "parse_sae_password", "SET sae_password secret|id=pw"), + (1, "hostapd_dpp_controller_parse", "SET dpp_controller ipaddr=127.0.0.1 pkhash=" + 32*"11"), (1, "hostapd_config_fill", "SET pac_opaque_encr_key 000102030405060708090a0b0c0d0e0f"), (1, "hostapd_config_fill", "SET eap_message hello"),