struct sae_password_entry *e;
int conf_id = -1;
bool sae = false, psk = false;
+ size_t len;
if (hapd->dpp_pkex) {
wpa_printf(MSG_DEBUG,
if (ifaces->dpp_pb_cmd) {
/* Use the externally provided configuration */
os_free(hapd->dpp_pkex_auth_cmd);
- hapd->dpp_pkex_auth_cmd = os_strdup(ifaces->dpp_pb_cmd);
+ len = 30 + os_strlen(ifaces->dpp_pb_cmd);
+ hapd->dpp_pkex_auth_cmd = os_malloc(len);
if (!hapd->dpp_pkex_auth_cmd) {
hostapd_dpp_push_button_stop(hapd);
return;
}
+ os_snprintf(hapd->dpp_pkex_auth_cmd, len, " own=%d %s",
+ hapd->dpp_pkex_bi->id, ifaces->dpp_pb_cmd);
return;
}
hapd->conf->ssid.wpa_passphrase)
password = hapd->conf->ssid.wpa_passphrase;
if (password) {
- size_t len = 2 * os_strlen(password) + 1;
-
+ len = 2 * os_strlen(password) + 1;
pass_hex = os_malloc(len);
if (!pass_hex) {
hostapd_dpp_push_button_stop(hapd);
str_clear_free(pass_hex);
os_free(hapd->dpp_pkex_auth_cmd);
- hapd->dpp_pkex_auth_cmd = os_strdup(cmd);
+ len = 30 + os_strlen(cmd);
+ hapd->dpp_pkex_auth_cmd = os_malloc(len);
+ if (hapd->dpp_pkex_auth_cmd)
+ os_snprintf(hapd->dpp_pkex_auth_cmd, len, " own=%d %s",
+ hapd->dpp_pkex_bi->id, cmd);
forced_memzero(cmd, sizeof(cmd));
if (!hapd->dpp_pkex_auth_cmd) {
hostapd_dpp_push_button_stop(hapd);
struct dpp_pkex *pkex;
struct wpabuf *msg;
unsigned int wait_time;
+ size_t len;
if (wpa_s->dpp_pkex) {
wpa_printf(MSG_DEBUG,
/* Use the externally provided configuration */
os_free(wpa_s->dpp_pkex_auth_cmd);
- wpa_s->dpp_pkex_auth_cmd = os_strdup(wpa_s->dpp_pb_cmd);
- if (!wpa_s->dpp_pkex_auth_cmd)
+ len = 30 + os_strlen(wpa_s->dpp_pb_cmd);
+ wpa_s->dpp_pkex_auth_cmd = os_malloc(len);
+ if (wpa_s->dpp_pkex_auth_cmd)
+ os_snprintf(wpa_s->dpp_pkex_auth_cmd, len, " own=%d %s",
+ wpa_s->dpp_pkex_bi->id, wpa_s->dpp_pb_cmd);
+ else
wpas_dpp_push_button_stop(wpa_s);
}