From 53d5de6f1de409ad15efced7ca04608f22c6c369 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 21 Dec 2018 11:42:01 +0200 Subject: [PATCH] DPP: Accept DPP_CONFIGURATION_SIGN without double space before parameters Make this command more convenient to use by not requiring two space characters between the command and the first parameter. Signed-off-by: Jouni Malinen --- hostapd/ctrl_iface.c | 2 +- wpa_supplicant/ctrl_iface.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 75f12e543..a0604ed09 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -3229,7 +3229,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd, if (hostapd_dpp_configurator_remove(hapd, buf + 24) < 0) reply_len = -1; } else if (os_strncmp(buf, "DPP_CONFIGURATOR_SIGN ", 22) == 0) { - if (hostapd_dpp_configurator_sign(hapd, buf + 22) < 0) + if (hostapd_dpp_configurator_sign(hapd, buf + 21) < 0) reply_len = -1; } else if (os_strncmp(buf, "DPP_CONFIGURATOR_GET_KEY ", 25) == 0) { reply_len = hostapd_dpp_configurator_get_key(hapd, diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 951989a10..be976a646 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -10610,7 +10610,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, if (wpas_dpp_configurator_remove(wpa_s, buf + 24) < 0) reply_len = -1; } else if (os_strncmp(buf, "DPP_CONFIGURATOR_SIGN ", 22) == 0) { - if (wpas_dpp_configurator_sign(wpa_s, buf + 22) < 0) + if (wpas_dpp_configurator_sign(wpa_s, buf + 21) < 0) reply_len = -1; } else if (os_strncmp(buf, "DPP_CONFIGURATOR_GET_KEY ", 25) == 0) { reply_len = wpas_dpp_configurator_get_key(wpa_s, atoi(buf + 25),