path: root/wpa_supplicant/dpp_supplicant.c
diff options
authorPurushottam Kushwaha <pkushwah@codeaurora.org>2018-03-16 10:04:21 (GMT)
committerJouni Malinen <j@w1.fi>2018-03-16 18:55:32 (GMT)
commit8179ae3a2a375ff293b87eab2e9761f8919aa516 (patch)
tree8ec98b98cbabc4a7516a9418dd158d2a27c54cb1 /wpa_supplicant/dpp_supplicant.c
parent4bc801ab42eb9308e82bc9ac35f82c13d497c80e (diff)
DPP: Support retrieving of configurator's private key
To retain configurator information across hostapd/wpa_supplicant restart, private key need to be maintained to generate a valid pair of authentication keys (connector, netaccess_key, csign) for new enrollees in the network. Add a DPP_CONFIGURATOR_GET_KEY control interface API through which the private key of an existing configurator can be fetched. Command format: DPP_CONFIGURATOR_GET_KEY <configurator_id> The output from this command can then be used with "DPP_CONFIGURATOR_ADD key=<hexdump>" to create the same key again. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'wpa_supplicant/dpp_supplicant.c')
1 files changed, 13 insertions, 0 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 57ba7bc..d14203f 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2275,6 +2275,19 @@ int wpas_dpp_configurator_sign(struct wpa_supplicant *wpa_s, const char *cmd)
+int wpas_dpp_configurator_get_key(struct wpa_supplicant *wpa_s, unsigned int id,
+ char *buf, size_t buflen)
+ struct dpp_configurator *conf;
+ conf = dpp_configurator_get_id(wpa_s, id);
+ if (!conf)
+ return -1;
+ return dpp_configurator_get_key(conf, buf, buflen);
static void
wpas_dpp_tx_introduction_status(struct wpa_supplicant *wpa_s,
unsigned int freq, const u8 *dst,