WPS: Allow NFC password token from AP to be used with wps_reg

The AP PIN on wps_reg command can now be replaced with special value
"nfc-pw" to use device password from a NFC password token from the AP.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-06-28 19:41:26 +03:00
parent e6ea2a451c
commit e484e927a6
2 changed files with 7 additions and 9 deletions

View file

@ -1897,21 +1897,13 @@ static int wpas_wps_use_cred(struct wpa_supplicant *wpa_s,
}
#ifdef CONFIG_WPS_ER
static int wpas_wps_add_nfc_password_token(struct wpa_supplicant *wpa_s,
struct wps_parse_attr *attr)
{
if (wpa_s->wps_er == NULL) {
wpa_printf(MSG_DEBUG, "WPS: Ignore NFC password token while "
"ER functionality is disabled");
return -1;
}
return wps_registrar_add_nfc_password_token(
wpa_s->wps->registrar, attr->oob_dev_password,
attr->oob_dev_password_len);
}
#endif /* CONFIG_WPS_ER */
static int wpas_wps_nfc_tag_process(struct wpa_supplicant *wpa_s,