DPP: Extend dpp_test with invalid E-Nonce in Config Req

Allow an E-Nonce attribute with invalid length to be sent for protocol
testing purposes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-11-30 22:01:10 +02:00 committed by Jouni Malinen
parent 087f494140
commit f0a383a981
2 changed files with 8 additions and 0 deletions

View file

@ -2211,6 +2211,13 @@ struct wpabuf * dpp_build_conf_req(struct dpp_authentication *auth,
wpa_printf(MSG_INFO, "DPP: TESTING - no E-nonce");
goto skip_e_nonce;
}
if (dpp_test == DPP_TEST_INVALID_E_NONCE_CONF_REQ) {
wpa_printf(MSG_INFO, "DPP: TESTING - invalid E-nonce");
wpabuf_put_le16(clear, DPP_ATTR_ENROLLEE_NONCE);
wpabuf_put_le16(clear, nonce_len - 1);
wpabuf_put_data(clear, auth->e_nonce, nonce_len - 1);
goto skip_e_nonce;
}
if (dpp_test == DPP_TEST_NO_WRAPPED_DATA_CONF_REQ) {
wpa_printf(MSG_INFO, "DPP: TESTING - no Wrapped Data");
goto skip_wrapped_data;

View file

@ -324,6 +324,7 @@ enum dpp_test_behavior {
DPP_TEST_INVALID_CONNECTOR_PEER_DISC_REQ = 80,
DPP_TEST_INVALID_I_NONCE_AUTH_REQ = 81,
DPP_TEST_INVALID_TRANSACTION_ID_PEER_DISC_REQ = 82,
DPP_TEST_INVALID_E_NONCE_CONF_REQ = 83,
};
extern enum dpp_test_behavior dpp_test;