DPP: Protocol testing for invalid DPP Status value
Extend dpp_test to cover cases where DPP Status value is invalid in Authentication Response/Confirm frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
9efa531499
commit
3f35ec2dc3
2 changed files with 11 additions and 1 deletions
|
@ -2618,6 +2618,9 @@ static int dpp_auth_build_resp_ok(struct dpp_authentication *auth)
|
||||||
} else if (dpp_test == DPP_TEST_NO_STATUS_AUTH_RESP) {
|
} else if (dpp_test == DPP_TEST_NO_STATUS_AUTH_RESP) {
|
||||||
wpa_printf(MSG_INFO, "DPP: TESTING - no Status");
|
wpa_printf(MSG_INFO, "DPP: TESTING - no Status");
|
||||||
status = 255;
|
status = 255;
|
||||||
|
} else if (dpp_test == DPP_TEST_INVALID_STATUS_AUTH_RESP) {
|
||||||
|
wpa_printf(MSG_INFO, "DPP: TESTING - invalid Status");
|
||||||
|
status = 254;
|
||||||
} else if (dpp_test == DPP_TEST_NO_R_NONCE_AUTH_RESP) {
|
} else if (dpp_test == DPP_TEST_NO_R_NONCE_AUTH_RESP) {
|
||||||
wpa_printf(MSG_INFO, "DPP: TESTING - no R-nonce");
|
wpa_printf(MSG_INFO, "DPP: TESTING - no R-nonce");
|
||||||
r_nonce = NULL;
|
r_nonce = NULL;
|
||||||
|
@ -3023,8 +3026,13 @@ static struct wpabuf * dpp_auth_build_conf(struct dpp_authentication *auth,
|
||||||
i_pubkey_hash = NULL;
|
i_pubkey_hash = NULL;
|
||||||
|
|
||||||
#ifdef CONFIG_TESTING_OPTIONS
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
if (dpp_test == DPP_TEST_NO_STATUS_AUTH_CONF)
|
if (dpp_test == DPP_TEST_NO_STATUS_AUTH_CONF) {
|
||||||
|
wpa_printf(MSG_INFO, "DPP: TESTING - no Status");
|
||||||
goto skip_status;
|
goto skip_status;
|
||||||
|
} else if (dpp_test == DPP_TEST_INVALID_STATUS_AUTH_CONF) {
|
||||||
|
wpa_printf(MSG_INFO, "DPP: TESTING - invalid Status");
|
||||||
|
status = 254;
|
||||||
|
}
|
||||||
#endif /* CONFIG_TESTING_OPTIONS */
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
|
||||||
/* DPP Status */
|
/* DPP Status */
|
||||||
|
|
|
@ -300,6 +300,8 @@ enum dpp_test_behavior {
|
||||||
DPP_TEST_INVALID_I_BOOTSTRAP_KEY_HASH_AUTH_RESP = 71,
|
DPP_TEST_INVALID_I_BOOTSTRAP_KEY_HASH_AUTH_RESP = 71,
|
||||||
DPP_TEST_INVALID_R_BOOTSTRAP_KEY_HASH_AUTH_CONF = 72,
|
DPP_TEST_INVALID_R_BOOTSTRAP_KEY_HASH_AUTH_CONF = 72,
|
||||||
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_CONF = 75,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern enum dpp_test_behavior dpp_test;
|
extern enum dpp_test_behavior dpp_test;
|
||||||
|
|
Loading…
Reference in a new issue