DPP: Allow 3rd party information to be added into config request obj

This allows the DPP Configuration Request Object from an Enrollee to be
extended with 3rd party information. The new dpp_extra_conf_req_name and
dpp_extra_conf_req_value configuration parameters specify the name of
the added JSON node and its contents. For example:
dpp_extra_conf_req_name=org.example
dpp_extra_conf_req_value={"a":1,"b":"test"}

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-07-16 12:31:28 +03:00 committed by Jouni Malinen
parent 3d82fbe058
commit 0e2217c95b
12 changed files with 113 additions and 13 deletions

View file

@ -343,6 +343,9 @@ static int hostapd_dpp_pkex_done(void *ctx, void *conn,
return dpp_tcp_auth(hapd->iface->interfaces->dpp, conn, auth,
hapd->conf->dpp_name, DPP_NETROLE_AP,
hapd->conf->dpp_mud_url,
hapd->conf->dpp_extra_conf_req_name,
hapd->conf->dpp_extra_conf_req_value,
hostapd_dpp_process_conf_obj, NULL);
}
#endif /* CONFIG_DPP2 */
@ -928,7 +931,10 @@ int hostapd_dpp_auth_init(struct hostapd_data *hapd, const char *cmd)
if (tcp)
return dpp_tcp_init(hapd->iface->interfaces->dpp, auth,
&ipaddr, tcp_port, hapd->conf->dpp_name,
DPP_NETROLE_AP, hapd->msg_ctx, hapd,
DPP_NETROLE_AP, hapd->conf->dpp_mud_url,
hapd->conf->dpp_extra_conf_req_name,
hapd->conf->dpp_extra_conf_req_value,
hapd->msg_ctx, hapd,
hostapd_dpp_process_conf_obj, NULL);
#endif /* CONFIG_DPP2 */
@ -1287,7 +1293,9 @@ static void hostapd_dpp_start_gas_client(struct hostapd_data *hapd)
buf = dpp_build_conf_req_helper(auth, hapd->conf->dpp_name,
DPP_NETROLE_AP,
hapd->conf->dpp_mud_url, NULL);
hapd->conf->dpp_mud_url, NULL,
hapd->conf->dpp_extra_conf_req_name,
hapd->conf->dpp_extra_conf_req_value);
if (!buf) {
wpa_printf(MSG_DEBUG,
"DPP: No configuration request data available");