}
-int wps_validate_m4_encr(const struct wpabuf *tlvs)
+int wps_validate_m4_encr(const struct wpabuf *tlvs, int wps2)
{
struct wps_parse_attr attr;
- int wps2;
if (tlvs == NULL) {
wpa_printf(MSG_INFO, "WPS-STRICT: No TLVs in M4 encrypted "
return -1;
}
- wps2 = attr.version2 != NULL;
if (wps_validate_r_snonce1(attr.r_snonce1, 1) ||
wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
wpa_printf(MSG_INFO, "WPS-STRICT: Invalid M4 encrypted "
}
-int wps_validate_m5_encr(const struct wpabuf *tlvs)
+int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2)
{
struct wps_parse_attr attr;
- int wps2;
if (tlvs == NULL) {
wpa_printf(MSG_INFO, "WPS-STRICT: No TLVs in M5 encrypted "
return -1;
}
- wps2 = attr.version2 != NULL;
if (wps_validate_e_snonce1(attr.e_snonce1, 1) ||
wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
wpa_printf(MSG_INFO, "WPS-STRICT: Invalid M5 encrypted "
}
-int wps_validate_m6_encr(const struct wpabuf *tlvs)
+int wps_validate_m6_encr(const struct wpabuf *tlvs, int wps2)
{
struct wps_parse_attr attr;
- int wps2;
if (tlvs == NULL) {
wpa_printf(MSG_INFO, "WPS-STRICT: No TLVs in M6 encrypted "
return -1;
}
- wps2 = attr.version2 != NULL;
if (wps_validate_r_snonce2(attr.r_snonce2, 1) ||
wps_validate_key_wrap_auth(attr.key_wrap_auth, 1)) {
wpa_printf(MSG_INFO, "WPS-STRICT: Invalid M6 encrypted "
}
-int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap)
+int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap, int wps2)
{
struct wps_parse_attr attr;
- int wps2;
if (tlvs == NULL) {
wpa_printf(MSG_INFO, "WPS-STRICT: No TLVs in M7 encrypted "
return -1;
}
- wps2 = attr.version2 != NULL;
if (wps_validate_e_snonce2(attr.e_snonce2, 1) ||
wps_validate_ssid(attr.ssid, attr.ssid_len, !ap) ||
wps_validate_mac_addr(attr.mac_addr, !ap) ||
}
-int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap)
+int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap, int wps2)
{
struct wps_parse_attr attr;
- int wps2;
if (tlvs == NULL) {
wpa_printf(MSG_INFO, "WPS-STRICT: No TLVs in M8 encrypted "
return -1;
}
- wps2 = attr.version2 != NULL;
if (wps_validate_ssid(attr.ssid, attr.ssid_len, ap) ||
wps_validate_auth_type(attr.auth_type, ap) ||
wps_validate_encr_type(attr.encr_type, ap) ||