DPP: Require conf=configurator to allow Configurator provisioning

Make Configurator provisioning require explicit conf parameter enabling
similarly to the previously used conf=ap-* and conf=sta-* cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-02-06 03:34:36 +02:00
parent 269a78786e
commit e2b1e7dce7
2 changed files with 11 additions and 0 deletions

View file

@ -4517,6 +4517,10 @@ static int dpp_configuration_parse_helper(struct dpp_authentication *auth,
conf = conf_ap; conf = conf_ap;
} }
pos = os_strstr(cmd, " conf=configurator");
if (pos)
auth->provision_configurator = 1;
if (!conf) if (!conf)
return 0; return 0;
@ -5605,6 +5609,12 @@ static struct wpabuf * dpp_build_enveloped_data(struct dpp_authentication *auth)
return NULL; return NULL;
} }
if (!auth->provision_configurator) {
wpa_printf(MSG_DEBUG,
"DPP: Configurator provisioning not allowed");
return NULL;
}
wpa_printf(MSG_DEBUG, "DPP: Building DPPEnvelopedData"); wpa_printf(MSG_DEBUG, "DPP: Building DPPEnvelopedData");
hash_len = auth->conf->curve->hash_len; hash_len = auth->conf->curve->hash_len;

View file

@ -254,6 +254,7 @@ struct dpp_authentication {
struct dpp_configuration *conf2_ap; struct dpp_configuration *conf2_ap;
struct dpp_configuration *conf_sta; struct dpp_configuration *conf_sta;
struct dpp_configuration *conf2_sta; struct dpp_configuration *conf2_sta;
int provision_configurator;
struct dpp_configurator *conf; struct dpp_configurator *conf;
struct dpp_config_obj { struct dpp_config_obj {
char *connector; /* received signedConnector */ char *connector; /* received signedConnector */