DPP2: Support mutual auth with QR in scan-during-auth-exchange case

Extend DPP authentication session search for the DPP_QR_CODE command to
cover the ongoing exchanges in Controller/Responder.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-08-12 12:04:25 +03:00 committed by Jouni Malinen
parent 2e956c37d2
commit fc3efe0834
3 changed files with 28 additions and 0 deletions

View file

@ -1719,6 +1719,28 @@ struct dpp_authentication * dpp_controller_get_auth(struct dpp_global *dpp,
}
void dpp_controller_new_qr_code(struct dpp_global *dpp,
struct dpp_bootstrap_info *bi)
{
struct dpp_controller *ctrl = dpp->controller;
struct dpp_connection *conn;
if (!ctrl)
return;
dl_list_for_each(conn, &ctrl->conn, struct dpp_connection, list) {
struct dpp_authentication *auth = conn->auth;
if (!auth->response_pending ||
dpp_notify_new_qr_code(auth, bi) != 1)
continue;
wpa_printf(MSG_DEBUG,
"DPP: Sending out pending authentication response");
dpp_tcp_send_msg(conn, conn->auth->resp_msg);
}
}
void dpp_tcp_init_flush(struct dpp_global *dpp)
{
struct dpp_connection *conn, *tmp;