DPP: Protocol testing for invalid Config Attrib Object value

Extend dpp_test to cover a case where Config Attrib Object value is
invalid in Configuration Request frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-11-19 14:12:10 +02:00 committed by Jouni Malinen
parent 655e82b1bb
commit f9cf7d03f1
2 changed files with 7 additions and 0 deletions

View file

@ -302,6 +302,7 @@ enum dpp_test_behavior {
DPP_TEST_INVALID_I_BOOTSTRAP_KEY_HASH_AUTH_CONF = 73, DPP_TEST_INVALID_I_BOOTSTRAP_KEY_HASH_AUTH_CONF = 73,
DPP_TEST_INVALID_STATUS_AUTH_RESP = 74, DPP_TEST_INVALID_STATUS_AUTH_RESP = 74,
DPP_TEST_INVALID_STATUS_AUTH_CONF = 75, DPP_TEST_INVALID_STATUS_AUTH_CONF = 75,
DPP_TEST_INVALID_CONFIG_ATTR_OBJ_CONF_REQ = 76,
}; };
extern enum dpp_test_behavior dpp_test; extern enum dpp_test_behavior dpp_test;

View file

@ -1275,6 +1275,12 @@ static void wpas_dpp_start_gas_client(struct wpa_supplicant *wpa_s)
"\"wi-fi_tech\":\"infra\"," "\"wi-fi_tech\":\"infra\","
"\"netRole\":\"%s\"}", "\"netRole\":\"%s\"}",
wpa_s->dpp_netrole_ap ? "ap" : "sta"); wpa_s->dpp_netrole_ap ? "ap" : "sta");
#ifdef CONFIG_TESTING_OPTIONS
if (dpp_test == DPP_TEST_INVALID_CONFIG_ATTR_OBJ_CONF_REQ) {
wpa_printf(MSG_INFO, "DPP: TESTING - invalid Config Attr");
json[29] = 'k'; /* replace "infra" with "knfra" */
}
#endif /* CONFIG_TESTING_OPTIONS */
wpa_printf(MSG_DEBUG, "DPP: GAS Config Attributes: %s", json); wpa_printf(MSG_DEBUG, "DPP: GAS Config Attributes: %s", json);
offchannel_send_action_done(wpa_s); offchannel_send_action_done(wpa_s);