aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-09-08 15:08:26 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-27 19:44:30 (GMT)
commitdd87677115ec62337e0a22b67ff55c52240c256d (patch)
tree312085289aa1fb0e7e253e3c84a079c18ee7c837 /src/wps
parentabe44e3ca20245ed991f105399b0e868b2e3b691 (diff)
downloadhostap-dd87677115ec62337e0a22b67ff55c52240c256d.zip
hostap-dd87677115ec62337e0a22b67ff55c52240c256d.tar.gz
hostap-dd87677115ec62337e0a22b67ff55c52240c256d.tar.bz2
P2P NFC: Enable own NFC Tag on GO Registrar
When "P2P_SET nfc_tag 1" is used to enable the own NFC Tag for P2P, also enable it for any running GO interface. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_registrar.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index 56b8e23..6d879be 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -1373,6 +1373,12 @@ static int wps_get_dev_password(struct wps_data *wps)
"Password Token");
pin = wps->nfc_pw_token->dev_pw;
pin_len = wps->nfc_pw_token->dev_pw_len;
+ } else if (wps->dev_pw_id >= 0x10 &&
+ wps->wps->ap_nfc_dev_pw_id == wps->dev_pw_id &&
+ wps->wps->ap_nfc_dev_pw) {
+ wpa_printf(MSG_DEBUG, "WPS: Use OOB Device Password from own NFC Password Token");
+ pin = wpabuf_head(wps->wps->ap_nfc_dev_pw);
+ pin_len = wpabuf_len(wps->wps->ap_nfc_dev_pw);
#endif /* CONFIG_WPS_NFC */
} else {
pin = wps_registrar_get_pin(wps->wps->registrar, wps->uuid_e,
@@ -2608,6 +2614,10 @@ static enum wps_process_res wps_process_m1(struct wps_data *wps,
wpa_printf(MSG_DEBUG, "WPS: Found matching NFC "
"Password Token (no peer PK hash)");
wps->nfc_pw_token = token;
+ } else if (wps->dev_pw_id >= 0x10 &&
+ wps->wps->ap_nfc_dev_pw_id == wps->dev_pw_id &&
+ wps->wps->ap_nfc_dev_pw) {
+ wpa_printf(MSG_DEBUG, "WPS: Found match with own NFC Password Token");
}
}
#endif /* CONFIG_WPS_NFC */