]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS NFC: Add debug log entry on OOB Dev Pw attribute addition
authorJouni Malinen <jouni@qca.qualcomm.com>
Sat, 7 Sep 2013 23:59:24 +0000 (16:59 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 7 Nov 2013 11:48:42 +0000 (13:48 +0200)
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/wps/wps_attr_build.c

index 3be89453169ab4157a7f63d75511eb367232b60e..b2327544744fba0c431b945f035bbacbd878bf2a 100644 (file)
@@ -382,14 +382,20 @@ int wps_build_oob_dev_pw(struct wpabuf *msg, u16 dev_pw_id,
        const u8 *addr[1];
        u8 pubkey_hash[WPS_HASH_LEN];
 
+       wpa_printf(MSG_DEBUG, "WPS:  * OOB Device Password (dev_pw_id=%u)",
+                  dev_pw_id);
        addr[0] = wpabuf_head(pubkey);
        hash_len = wpabuf_len(pubkey);
        sha256_vector(1, addr, &hash_len, pubkey_hash);
 
        wpabuf_put_be16(msg, ATTR_OOB_DEVICE_PASSWORD);
        wpabuf_put_be16(msg, WPS_OOB_PUBKEY_HASH_LEN + 2 + dev_pw_len);
+       wpa_hexdump(MSG_DEBUG, "WPS: Public Key Hash",
+                   pubkey_hash, WPS_OOB_PUBKEY_HASH_LEN);
        wpabuf_put_data(msg, pubkey_hash, WPS_OOB_PUBKEY_HASH_LEN);
        wpabuf_put_be16(msg, dev_pw_id);
+       wpa_hexdump_key(MSG_DEBUG, "WPS: OOB Device Password",
+                       dev_pw, dev_pw_len);
        wpabuf_put_data(msg, dev_pw, dev_pw_len);
 
        return 0;