DPP: AP parameters for DPP AKM

Extend hostapd configuration to include parameters needed for the DPP
AKM: dpp_connector, dpp_netaccesskey, dpp_netaccesskey_expiry,
dpp_csign, dpp_csign_expiry.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-06-18 17:29:57 +03:00 committed by Jouni Malinen
parent b979caae57
commit 56c7549587
3 changed files with 29 additions and 0 deletions

View file

@ -3719,6 +3719,21 @@ static int hostapd_config_fill(struct hostapd_config *conf,
bss->multicast_to_unicast = atoi(pos);
} else if (os_strcmp(buf, "broadcast_deauth") == 0) {
bss->broadcast_deauth = atoi(pos);
#ifdef CONFIG_DPP
} else if (os_strcmp(buf, "dpp_connector") == 0) {
os_free(bss->dpp_connector);
bss->dpp_connector = os_strdup(pos);
} else if (os_strcmp(buf, "dpp_netaccesskey") == 0) {
if (parse_wpabuf_hex(line, buf, &bss->dpp_netaccesskey, pos))
return 1;
} else if (os_strcmp(buf, "dpp_netaccesskey_expiry") == 0) {
bss->dpp_netaccesskey_expiry = strtol(pos, NULL, 0);
} else if (os_strcmp(buf, "dpp_csign") == 0) {
if (parse_wpabuf_hex(line, buf, &bss->dpp_csign, pos))
return 1;
} else if (os_strcmp(buf, "dpp_csign_expiry") == 0) {
bss->dpp_csign_expiry = strtol(pos, NULL, 0);
#endif /* CONFIG_DPP */
} else {
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",

View file

@ -624,6 +624,12 @@ void hostapd_config_free_bss(struct hostapd_bss_config *conf)
hostapd_config_free_fils_realms(conf);
#ifdef CONFIG_DPP
os_free(conf->dpp_connector);
wpabuf_free(conf->dpp_netaccesskey);
wpabuf_free(conf->dpp_csign);
#endif /* CONFIG_DPP */
os_free(conf);
}

View file

@ -625,6 +625,14 @@ struct hostapd_bss_config {
int multicast_to_unicast;
int broadcast_deauth;
#ifdef CONFIG_DPP
char *dpp_connector;
struct wpabuf *dpp_netaccesskey;
unsigned int dpp_netaccesskey_expiry;
struct wpabuf *dpp_csign;
unsigned int dpp_csign_expiry;
#endif /* CONFIG_DPP */
};
/**