struct wps_credential new_ap_settings;
int res;
u8 dev_pw[WPS_OOB_DEVICE_PASSWORD_LEN];
+ int nfc = 0;
wps = sm->wps;
if (wps == NULL) {
cfg.pin = dev_pw;
cfg.pin_len /= 2;
}
+ if (cfg.pin_len == 6 && os_strncmp(pos, "nfc-pw", 6) == 0) {
+ cfg.pin = NULL;
+ cfg.pin_len = 0;
+ nfc = 1;
+ }
} else {
pos = os_strstr(phase1, "pbc=1");
if (pos)
cfg.pbc = 1;
}
- if (cfg.pin == NULL && !cfg.pbc) {
+ if (cfg.pin == NULL && !cfg.pbc && !nfc) {
wpa_printf(MSG_INFO, "EAP-WSC: PIN or PBC not set in phase1 "
"configuration data");
os_free(data);
}
-#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,