diff options
author | Jouni Malinen <jouni@codeaurora.org> | 2019-03-24 20:17:49 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2019-04-21 20:14:37 (GMT) |
commit | 9ffec2e854719ffc133bc0b4f01aad8f07915403 (patch) | |
tree | 092e5da898738f5ad2f0d2870c1c6db00fe1d249 | |
parent | 2ed2b52ff580513ea407966073a9581aec90a1c5 (diff) | |
download | hostap-9ffec2e854719ffc133bc0b4f01aad8f07915403.zip hostap-9ffec2e854719ffc133bc0b4f01aad8f07915403.tar.gz hostap-9ffec2e854719ffc133bc0b4f01aad8f07915403.tar.bz2 |
DPP: Make pkhash available in bootstrapping info
This can be helpful for testing DPP2 Controller functionality (get
pkhash from Controller to Relay).
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r-- | src/common/dpp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/dpp.c b/src/common/dpp.c index 6f0d91d..470d91c 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -8534,20 +8534,25 @@ int dpp_bootstrap_info(struct dpp_global *dpp, int id, char *reply, int reply_size) { struct dpp_bootstrap_info *bi; + char pkhash[2 * SHA256_MAC_LEN + 1]; bi = dpp_bootstrap_get_id(dpp, id); if (!bi) return -1; + wpa_snprintf_hex(pkhash, sizeof(pkhash), bi->pubkey_hash, + SHA256_MAC_LEN); return os_snprintf(reply, reply_size, "type=%s\n" "mac_addr=" MACSTR "\n" "info=%s\n" "num_freq=%u\n" - "curve=%s\n", + "curve=%s\n" + "pkhash=%s\n", dpp_bootstrap_type_txt(bi->type), MAC2STR(bi->mac_addr), bi->info ? bi->info : "", bi->num_freq, - bi->curve->name); + bi->curve->name, + pkhash); } |