DPP: Add configuration structure to dpp_global_init()

This can be used to provide configurable parameter to the global DPP
context. This initial commit introduces the msg_ctx context pointer for
wpa_msg().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-04-21 21:18:24 +03:00 committed by Jouni Malinen
parent 516ccede8f
commit 2ed2b52ff5
4 changed files with 20 additions and 4 deletions

View file

@ -71,6 +71,7 @@ static void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr,
struct dpp_global {
void *msg_ctx;
struct dl_list bootstrap; /* struct dpp_bootstrap_info */
struct dl_list configurator; /* struct dpp_configurator */
};
@ -8689,13 +8690,14 @@ int dpp_configurator_get_key_id(struct dpp_global *dpp, unsigned int id,
}
struct dpp_global * dpp_global_init(void)
struct dpp_global * dpp_global_init(struct dpp_global_config *config)
{
struct dpp_global *dpp;
dpp = os_zalloc(sizeof(*dpp));
if (!dpp)
return NULL;
dpp->msg_ctx = config->msg_ctx;
dl_list_init(&dpp->bootstrap);
dl_list_init(&dpp->configurator);