mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-29 08:14:02 -05:00
WPS: Remove Version attribute from NFC messages
This old Version attribute is not really needed anymore for these use cases with the assumption that there are no existing WPS+NFC deployments. It was removed from the WSC specification, so make the implementation match that change. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
72403ecef7
commit
e435417eef
@ -365,8 +365,7 @@ struct wpabuf * wps_get_oob_cred(struct wps_context *wps)
|
|||||||
data.wps = wps;
|
data.wps = wps;
|
||||||
data.auth_type = wps->auth_types;
|
data.auth_type = wps->auth_types;
|
||||||
data.encr_type = wps->encr_types;
|
data.encr_type = wps->encr_types;
|
||||||
if (wps_build_version(plain) ||
|
if (wps_build_cred(&data, plain) ||
|
||||||
wps_build_cred(&data, plain) ||
|
|
||||||
wps_build_wfa_ext(plain, 0, NULL, 0)) {
|
wps_build_wfa_ext(plain, 0, NULL, 0)) {
|
||||||
os_free(data.new_psk);
|
os_free(data.new_psk);
|
||||||
wpabuf_free(plain);
|
wpabuf_free(plain);
|
||||||
@ -412,8 +411,7 @@ struct wpabuf * wps_build_nfc_pw_token(u16 dev_pw_id,
|
|||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (wps_build_version(data) ||
|
if (wps_build_oob_dev_pw(data, dev_pw_id, pubkey,
|
||||||
wps_build_oob_dev_pw(data, dev_pw_id, pubkey,
|
|
||||||
wpabuf_head(dev_pw), wpabuf_len(dev_pw)) ||
|
wpabuf_head(dev_pw), wpabuf_len(dev_pw)) ||
|
||||||
wps_build_wfa_ext(data, 0, NULL, 0)) {
|
wps_build_wfa_ext(data, 0, NULL, 0)) {
|
||||||
wpa_printf(MSG_ERROR, "WPS: Failed to build NFC password "
|
wpa_printf(MSG_ERROR, "WPS: Failed to build NFC password "
|
||||||
|
@ -2040,8 +2040,7 @@ struct wpabuf * wps_er_config_token_from_cred(struct wps_context *wps,
|
|||||||
os_memset(&data, 0, sizeof(data));
|
os_memset(&data, 0, sizeof(data));
|
||||||
data.wps = wps;
|
data.wps = wps;
|
||||||
data.use_cred = cred;
|
data.use_cred = cred;
|
||||||
if (wps_build_version(ret) ||
|
if (wps_build_cred(&data, ret) ||
|
||||||
wps_build_cred(&data, ret) ||
|
|
||||||
wps_build_wfa_ext(ret, 0, NULL, 0)) {
|
wps_build_wfa_ext(ret, 0, NULL, 0)) {
|
||||||
wpabuf_free(ret);
|
wpabuf_free(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user