aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dpp_supplicant.c
diff options
context:
space:
mode:
authorSrinivas Dasari <dasaris@codeaurora.org>2018-03-07 11:56:26 (GMT)
committerJouni Malinen <j@w1.fi>2018-03-12 23:03:37 (GMT)
commitd74963d4116ac6099ad11f728fd4501fa41282a0 (patch)
tree172f012e21ab7572912bf4d37ec20287abe3135a /wpa_supplicant/dpp_supplicant.c
parentf8bfc9cbded0326e40805e916c208960e61049f6 (diff)
downloadhostap-d74963d4116ac6099ad11f728fd4501fa41282a0.zip
hostap-d74963d4116ac6099ad11f728fd4501fa41282a0.tar.gz
hostap-d74963d4116ac6099ad11f728fd4501fa41282a0.tar.bz2
DPP: Extend dpp_test 89 functionality to transmit side
This extends dpp_test functionality to allow DPP exchanges to be stopped after authentication is completed on the Initiator, i.e., after sending out the Authentication Confirm message. Previously, dpp_test=89 was used only on the Responder side to stop after receiving the Authentication Confirm message. The main use case for this extended functionality is to be able to stop the protocol exchange on a device that acts as authentication Initiator and Enrollee. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'wpa_supplicant/dpp_supplicant.c')
-rw-r--r--wpa_supplicant/dpp_supplicant.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 9755ece..57ba7bc 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -1434,6 +1434,17 @@ static void wpas_dpp_auth_success(struct wpa_supplicant *wpa_s, int initiator)
{
wpa_printf(MSG_DEBUG, "DPP: Authentication succeeded");
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_AUTH_SUCCESS "init=%d", initiator);
+#ifdef CONFIG_TESTING_OPTIONS
+ if (dpp_test == DPP_TEST_STOP_AT_AUTH_CONF) {
+ wpa_printf(MSG_INFO,
+ "DPP: TESTING - stop at Authentication Confirm");
+ if (wpa_s->dpp_auth->configurator) {
+ /* Prevent GAS response */
+ wpa_s->dpp_auth->auth_success = 0;
+ }
+ return;
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
if (wpa_s->dpp_auth->configurator)
wpas_dpp_start_gas_server(wpa_s);