DPP: Add self configuration command in hostapd_cli and wpa_cli

The back-end support for DPP self configuration was already present in
hostapd and wpa_supplicant. However, the command to invoke DPP self
configuration was not available in hostapd_cli and wpa_cli. Add the
command "dpp_configurator_sign" in them.

Signed-off-by: Prasad, Jagadeesh <Jagadeesh_Prasad@comcast.com>
This commit is contained in:
Prasad, Jagadeesh (Contractor) 2018-12-10 10:32:41 +00:00 committed by Jouni Malinen
parent 9552a7364f
commit d2b5138116
2 changed files with 19 additions and 0 deletions

View file

@ -1443,6 +1443,13 @@ static int hostapd_cli_cmd_dpp_configurator_get_key(struct wpa_ctrl *ctrl,
} }
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, static int hostapd_cli_cmd_dpp_pkex_add(struct wpa_ctrl *ctrl, int argc,
char *argv[]) char *argv[])
{ {
@ -1640,6 +1647,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "dpp_configurator_get_key", hostapd_cli_cmd_dpp_configurator_get_key, { "dpp_configurator_get_key", hostapd_cli_cmd_dpp_configurator_get_key,
NULL, NULL,
"<id> = Get DPP configurator's private key" }, "<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, { "dpp_pkex_add", hostapd_cli_cmd_dpp_pkex_add, NULL,
"add PKEX code" }, "add PKEX code" },
{ "dpp_pkex_remove", hostapd_cli_cmd_dpp_pkex_remove, NULL, { "dpp_pkex_remove", hostapd_cli_cmd_dpp_pkex_remove, NULL,

View file

@ -2955,6 +2955,13 @@ static int wpa_cli_cmd_dpp_configurator_get_key(struct wpa_ctrl *ctrl, int argc,
} }
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, static int wpa_cli_cmd_dpp_pkex_add(struct wpa_ctrl *ctrl, int argc,
char *argv[]) char *argv[])
{ {
@ -3614,6 +3621,9 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
{ "dpp_configurator_get_key", wpa_cli_cmd_dpp_configurator_get_key, { "dpp_configurator_get_key", wpa_cli_cmd_dpp_configurator_get_key,
NULL, cli_cmd_flag_none, NULL, cli_cmd_flag_none,
"<id> = Get DPP configurator's private key" }, "<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, { "dpp_pkex_add", wpa_cli_cmd_dpp_pkex_add, NULL,
cli_cmd_flag_sensitive, cli_cmd_flag_sensitive,
"add PKEX code" }, "add PKEX code" },