diff mbox series

DPP Self configuration command in hostapd and wpa cli

Message ID 1544437961541.93756@comcast.com
State Accepted
Headers show
Series DPP Self configuration command in hostapd and wpa cli | expand

Commit Message

Prasad, Jagadeesh (Contractor) Dec. 10, 2018, 10:32 a.m. UTC
​The back-end support for DPP self configuration was already present. However the command to invoke DPP self configuration was not available in hostapd and wpa cli. Added the command "dpp_configurator_sign"
in hostapd_cli and wpa_cli.


Signed-off-by: Prasad, Jagadeesh <Jagadeesh_Prasad@comcast.com>

---
 hostapd/hostapd_cli.c    | 7 +++++++
 wpa_supplicant/wpa_cli.c | 8 ++++++++
 2 files changed, 15 insertions(+)

--
2.14.1

Comments

Jouni Malinen Dec. 21, 2018, 11:17 a.m. UTC | #1
On Mon, Dec 10, 2018 at 10:32:41AM +0000, Prasad, Jagadeesh (Contractor) wrote:
> The back-end support for DPP self configuration was already present. However the command to invoke DPP self configuration was not available in hostapd and wpa cli. Added the command "dpp_configurator_sign"
> in hostapd_cli and wpa_cli.

Thanks, applied.
diff mbox series

Patch

diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 489da397c..21d59abf4 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1442,6 +1442,11 @@  static int hostapd_cli_cmd_dpp_configurator_get_key(struct wpa_ctrl *ctrl,
        return hostapd_cli_cmd(ctrl, "DPP_CONFIGURATOR_GET_KEY", 1, argc, argv);
 }

+static int hostapd_cli_cmd_dpp_configurator_sign(struct wpa_ctrl *ctrl,
+                                                 int argc, char *argv[])
+{
+       return hostapd_cli_cmd(ctrl, "DPP_CONFIGURATOR_SIGN", 1, argc, argv);
+}

 static int hostapd_cli_cmd_dpp_pkex_add(struct wpa_ctrl *ctrl, int argc,
                                        char *argv[])
@@ -1640,6 +1645,8 @@  static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
        { "dpp_configurator_get_key", hostapd_cli_cmd_dpp_configurator_get_key,
          NULL,
          "<id> = Get DPP configurator's private key" },
+        { "dpp_configurator_sign", hostapd_cli_cmd_dpp_configurator_sign, NULL,
+         " conf=<role> configurator=<id> = generate self DPP configuration" },
        { "dpp_pkex_add", hostapd_cli_cmd_dpp_pkex_add, NULL,
          "add PKEX code" },
        { "dpp_pkex_remove", hostapd_cli_cmd_dpp_pkex_remove, NULL,
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 779355440..647f1a962 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -2954,6 +2954,11 @@  static int wpa_cli_cmd_dpp_configurator_get_key(struct wpa_ctrl *ctrl, int argc,
        return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_GET_KEY", 1, argc, argv);
 }

+static int wpa_cli_cmd_dpp_configurator_sign(struct wpa_ctrl *ctrl, int argc,
+                                               char *argv[])
+{
+       return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_SIGN", 1, argc, argv);
+}

 static int wpa_cli_cmd_dpp_pkex_add(struct wpa_ctrl *ctrl, int argc,
                                    char *argv[])
@@ -3614,6 +3619,9 @@  static const struct wpa_cli_cmd wpa_cli_commands[] = {
        { "dpp_configurator_get_key", wpa_cli_cmd_dpp_configurator_get_key,
          NULL, cli_cmd_flag_none,
          "<id> = Get DPP configurator's private key" },
+       { "dpp_configurator_sign", wpa_cli_cmd_dpp_configurator_sign, NULL,
+         cli_cmd_flag_none,
+         " conf=<role> configurator=<id> = generate self DPP configuration" },
        { "dpp_pkex_add", wpa_cli_cmd_dpp_pkex_add, NULL,
          cli_cmd_flag_sensitive,
          "add PKEX code" },