WPS: Add more debug information to M7 AP Settings
This allows the AP Settings data to be included in debug log (only with -K on command line). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
d7a15d5953
commit
8c18fcc237
1 changed files with 14 additions and 2 deletions
|
@ -265,7 +265,8 @@ static int wps_build_cred_encr_type(struct wps_data *wps, struct wpabuf *msg)
|
||||||
|
|
||||||
static int wps_build_cred_network_key(struct wps_data *wps, struct wpabuf *msg)
|
static int wps_build_cred_network_key(struct wps_data *wps, struct wpabuf *msg)
|
||||||
{
|
{
|
||||||
wpa_printf(MSG_DEBUG, "WPS: * Network Key");
|
wpa_printf(MSG_DEBUG, "WPS: * Network Key (len=%u)",
|
||||||
|
(unsigned int) wps->wps->network_key_len);
|
||||||
wpabuf_put_be16(msg, ATTR_NETWORK_KEY);
|
wpabuf_put_be16(msg, ATTR_NETWORK_KEY);
|
||||||
wpabuf_put_be16(msg, wps->wps->network_key_len);
|
wpabuf_put_be16(msg, wps->wps->network_key_len);
|
||||||
wpabuf_put_data(msg, wps->wps->network_key, wps->wps->network_key_len);
|
wpabuf_put_data(msg, wps->wps->network_key, wps->wps->network_key_len);
|
||||||
|
@ -285,6 +286,9 @@ static int wps_build_cred_mac_addr(struct wps_data *wps, struct wpabuf *msg)
|
||||||
|
|
||||||
static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain)
|
static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain)
|
||||||
{
|
{
|
||||||
|
const u8 *start, *end;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (wps->wps->ap_settings) {
|
if (wps->wps->ap_settings) {
|
||||||
wpa_printf(MSG_DEBUG, "WPS: * AP Settings (pre-configured)");
|
wpa_printf(MSG_DEBUG, "WPS: * AP Settings (pre-configured)");
|
||||||
wpabuf_put_data(plain, wps->wps->ap_settings,
|
wpabuf_put_data(plain, wps->wps->ap_settings,
|
||||||
|
@ -292,11 +296,19 @@ static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return wps_build_cred_ssid(wps, plain) ||
|
wpa_printf(MSG_DEBUG, "WPS: * AP Settings based on current configuration");
|
||||||
|
start = wpabuf_put(plain, 0);
|
||||||
|
ret = wps_build_cred_ssid(wps, plain) ||
|
||||||
wps_build_cred_mac_addr(wps, plain) ||
|
wps_build_cred_mac_addr(wps, plain) ||
|
||||||
wps_build_cred_auth_type(wps, plain) ||
|
wps_build_cred_auth_type(wps, plain) ||
|
||||||
wps_build_cred_encr_type(wps, plain) ||
|
wps_build_cred_encr_type(wps, plain) ||
|
||||||
wps_build_cred_network_key(wps, plain);
|
wps_build_cred_network_key(wps, plain);
|
||||||
|
end = wpabuf_put(plain, 0);
|
||||||
|
|
||||||
|
wpa_hexdump_key(MSG_DEBUG, "WPS: Plaintext AP Settings",
|
||||||
|
start, end - start);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue