DPP: Add DPP_BOOTSTRAP_SET command

"DPP_BOOTSTRAP_SET <ID> <configurator parameters..>" can now be used to
set peer specific configurator parameters which will override any global
parameters from dpp_configurator_params.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-03-27 17:28:59 +02:00 committed by Jouni Malinen
parent 804fc268af
commit 547dc7eaa3
4 changed files with 30 additions and 0 deletions

View file

@ -10532,6 +10532,26 @@ int dpp_bootstrap_info(struct dpp_global *dpp, int id,
}
int dpp_bootstrap_set(struct dpp_global *dpp, int id, const char *params)
{
struct dpp_bootstrap_info *bi;
bi = dpp_bootstrap_get_id(dpp, id);
if (!bi)
return -1;
str_clear_free(bi->configurator_params);
if (params) {
bi->configurator_params = os_strdup(params);
return bi->configurator_params ? 0 : -1;
}
bi->configurator_params = NULL;
return 0;
}
void dpp_bootstrap_find_pair(struct dpp_global *dpp, const u8 *i_bootstrap,
const u8 *r_bootstrap,
struct dpp_bootstrap_info **own_bi,

View file

@ -562,6 +562,7 @@ dpp_pkex_finish(struct dpp_global *dpp, struct dpp_pkex *pkex, const u8 *peer,
const char * dpp_bootstrap_get_uri(struct dpp_global *dpp, unsigned int id);
int dpp_bootstrap_info(struct dpp_global *dpp, int id,
char *reply, int reply_size);
int dpp_bootstrap_set(struct dpp_global *dpp, int id, const char *params);
void dpp_bootstrap_find_pair(struct dpp_global *dpp, const u8 *i_bootstrap,
const u8 *r_bootstrap,
struct dpp_bootstrap_info **own_bi,