WPS: Add more debug info for DH keys
authorJouni Malinen <jouni.malinen@atheros.com>
Sun, 18 Jul 2010 03:23:55 +0000 (20:23 -0700)
committerJouni Malinen <j@w1.fi>
Sun, 18 Jul 2010 03:23:55 +0000 (20:23 -0700)
src/wps/wps_attr_build.c
src/wps/wps_common.c

index 9da556a..9b345f1 100644 (file)
@@ -47,6 +47,8 @@ int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg)
                wpabuf_free(pubkey);
                return -1;
        }
+       wpa_hexdump_buf_key(MSG_DEBUG, "WPS: DH Private Key", wps->dh_privkey);
+       wpa_hexdump_buf(MSG_DEBUG, "WPS: DH Public Key", pubkey);
 
        wpabuf_put_be16(msg, ATTR_PUBLIC_KEY);
        wpabuf_put_be16(msg, wpabuf_len(pubkey));
index 6ef14db..f7cb7b8 100644 (file)
@@ -81,6 +81,8 @@ int wps_derive_keys(struct wps_data *wps)
                return -1;
        }
 
+       wpa_hexdump_buf_key(MSG_DEBUG, "WPS: DH Private Key", wps->dh_privkey);
+       wpa_hexdump_buf(MSG_DEBUG, "WPS: DH Public Key", pubkey);
        dh_shared = dh5_derive_shared(wps->dh_ctx, pubkey, wps->dh_privkey);
        dh5_free(wps->dh_ctx);
        wps->dh_ctx = NULL;