Lines Matching refs:attr

718 	struct wps_parse_attr *attr;  in wps_process_cred_e()  local
724 attr = (struct wps_parse_attr *)os_zalloc(sizeof(struct wps_parse_attr)); in wps_process_cred_e()
725 if (attr == NULL) in wps_process_cred_e()
730 if (wps_parse_msg(&msg, attr) < 0 || in wps_process_cred_e()
731 wps_process_cred(attr, &wps->cred)) { in wps_process_cred_e()
784 if (attr) in wps_process_cred_e()
785 os_free(attr); in wps_process_cred_e()
828 struct wps_parse_attr *attr, in wps_process_ap_settings_e() argument
845 if (wps_process_ap_settings(attr, cred) < 0) { in wps_process_ap_settings_e()
995 struct wps_parse_attr *attr) in wps_process_m2() argument
1006 if (wps_process_registrar_nonce(wps, attr->registrar_nonce) || in wps_process_m2()
1007 wps_process_enrollee_nonce(wps, attr->enrollee_nonce) || in wps_process_m2()
1008 wps_process_uuid_r(wps, attr->uuid_r) || in wps_process_m2()
1009 wps_process_dev_pw_id(wps, attr->dev_password_id)) { in wps_process_m2()
1030 if (wps_process_pubkey(wps, attr->public_key, attr->public_key_len) || in wps_process_m2()
1031 wps_process_authenticator(wps, attr->authenticator, msg) || in wps_process_m2()
1032 wps_process_device_attrs(&wps->peer_dev, attr)) { in wps_process_m2()
1042 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings, in wps_process_m2()
1043 attr->encr_settings_len); in wps_process_m2()
1057 eattr.num_cred, attr->version2 != NULL)) { in wps_process_m2()
1075 struct wps_parse_attr *attr) in wps_process_m2d() argument
1087 attr->manufacturer, attr->manufacturer_len); in wps_process_m2d()
1089 attr->model_name, attr->model_name_len); in wps_process_m2d()
1091 attr->model_number, attr->model_number_len); in wps_process_m2d()
1093 attr->serial_number, attr->serial_number_len); in wps_process_m2d()
1095 attr->dev_name, attr->dev_name_len); in wps_process_m2d()
1101 if (attr->config_methods) in wps_process_m2d()
1103 WPA_GET_BE16(attr->config_methods); in wps_process_m2d()
1104 m2d->manufacturer = attr->manufacturer; in wps_process_m2d()
1105 m2d->manufacturer_len = attr->manufacturer_len; in wps_process_m2d()
1106 m2d->model_name = attr->model_name; in wps_process_m2d()
1107 m2d->model_name_len = attr->model_name_len; in wps_process_m2d()
1108 m2d->model_number = attr->model_number; in wps_process_m2d()
1109 m2d->model_number_len = attr->model_number_len; in wps_process_m2d()
1110 m2d->serial_number = attr->serial_number; in wps_process_m2d()
1111 m2d->serial_number_len = attr->serial_number_len; in wps_process_m2d()
1112 m2d->dev_name = attr->dev_name; in wps_process_m2d()
1113 m2d->dev_name_len = attr->dev_name_len; in wps_process_m2d()
1114 m2d->primary_dev_type = attr->primary_dev_type; in wps_process_m2d()
1115 if (attr->config_error) in wps_process_m2d()
1117 WPA_GET_BE16(attr->config_error); in wps_process_m2d()
1118 if (attr->dev_password_id) in wps_process_m2d()
1120 WPA_GET_BE16(attr->dev_password_id); in wps_process_m2d()
1131 struct wps_parse_attr *attr) in wps_process_m4() argument
1154 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) || in wps_process_m4()
1155 wps_process_authenticator(wps, attr->authenticator, msg) || in wps_process_m4()
1156 wps_process_r_hash1(wps, attr->r_hash1) || in wps_process_m4()
1157 wps_process_r_hash2(wps, attr->r_hash2)) { in wps_process_m4()
1163 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings, in wps_process_m4()
1164 attr->encr_settings_len); in wps_process_m4()
1173 if (wps_validate_m4_encr(decrypted, attr->version2 != NULL) < 0) { in wps_process_m4()
1203 struct wps_parse_attr *attr) in wps_process_m6() argument
1226 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) || in wps_process_m6()
1227 wps_process_authenticator(wps, attr->authenticator, msg)) { in wps_process_m6()
1233 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings, in wps_process_m6()
1234 attr->encr_settings_len); in wps_process_m6()
1243 if (wps_validate_m6_encr(decrypted, attr->version2 != NULL) < 0) { in wps_process_m6()
1277 struct wps_parse_attr *attr) in wps_process_m8() argument
1300 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) || in wps_process_m8()
1301 wps_process_authenticator(wps, attr->authenticator, msg)) { in wps_process_m8()
1321 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings, in wps_process_m8()
1322 attr->encr_settings_len); in wps_process_m8()
1332 attr->version2 != NULL) < 0) { in wps_process_m8()
1344 eattr->num_cred, attr->version2 != NULL) || in wps_process_m8()
1346 attr->version2 != NULL)) { in wps_process_m8()
1380 struct wps_parse_attr *attr; in wps_process_wsc_msg() local
1385 attr = (struct wps_parse_attr *)os_zalloc(sizeof(struct wps_parse_attr)); in wps_process_wsc_msg()
1386 if (attr == NULL) { in wps_process_wsc_msg()
1391 if (wps_parse_msg(msg, attr) < 0) { in wps_process_wsc_msg()
1396 if (attr->enrollee_nonce == NULL || in wps_process_wsc_msg()
1397 os_memcmp(wps->nonce_e, attr->enrollee_nonce, WPS_NONCE_LEN) != 0) { in wps_process_wsc_msg()
1403 if (attr->msg_type == NULL) { in wps_process_wsc_msg()
1410 switch (*attr->msg_type) { in wps_process_wsc_msg()
1416 ret = wps_process_m2(wps, msg, attr); in wps_process_wsc_msg()
1423 ret = wps_process_m2d(wps, attr); in wps_process_wsc_msg()
1430 ret = wps_process_m4(wps, msg, attr); in wps_process_wsc_msg()
1441 ret = wps_process_m6(wps, msg, attr); in wps_process_wsc_msg()
1452 ret = wps_process_m8(wps, msg, attr); in wps_process_wsc_msg()
1460 *attr->msg_type); in wps_process_wsc_msg()
1472 if (ret == WPS_CONTINUE && *attr->msg_type != WPS_M2D) { in wps_process_wsc_msg()
1480 if (attr) in wps_process_wsc_msg()
1481 os_free(attr); in wps_process_wsc_msg()
1490 struct wps_parse_attr *attr; in wps_process_wsc_ack() local
1495 attr = (struct wps_parse_attr *)os_zalloc(sizeof(struct wps_parse_attr)); in wps_process_wsc_ack()
1496 if (attr == NULL) { in wps_process_wsc_ack()
1501 if (wps_parse_msg(msg, attr) < 0) { in wps_process_wsc_ack()
1506 if (attr->msg_type == NULL) { in wps_process_wsc_ack()
1512 if (*attr->msg_type != WPS_WSC_ACK) { in wps_process_wsc_ack()
1514 *attr->msg_type); in wps_process_wsc_ack()
1519 if (attr->registrar_nonce == NULL || in wps_process_wsc_ack()
1520 os_memcmp(wps->nonce_r, attr->registrar_nonce, WPS_NONCE_LEN) != 0) in wps_process_wsc_ack()
1527 if (attr->enrollee_nonce == NULL || in wps_process_wsc_ack()
1528 os_memcmp(wps->nonce_e, attr->enrollee_nonce, WPS_NONCE_LEN) != 0) { in wps_process_wsc_ack()
1545 if (attr) in wps_process_wsc_ack()
1546 os_free(attr); in wps_process_wsc_ack()
1555 struct wps_parse_attr *attr; in wps_process_wsc_nack() local
1561 attr = (struct wps_parse_attr *)os_zalloc(sizeof(struct wps_parse_attr)); in wps_process_wsc_nack()
1562 if (attr == NULL) { in wps_process_wsc_nack()
1567 if (wps_parse_msg(msg, attr) < 0) { in wps_process_wsc_nack()
1572 if (attr->msg_type == NULL) { in wps_process_wsc_nack()
1578 if (*attr->msg_type != WPS_WSC_NACK) { in wps_process_wsc_nack()
1580 *attr->msg_type); in wps_process_wsc_nack()
1585 if (attr->registrar_nonce == NULL || in wps_process_wsc_nack()
1586 os_memcmp(wps->nonce_r, attr->registrar_nonce, WPS_NONCE_LEN) != 0) in wps_process_wsc_nack()
1590 attr->registrar_nonce, WPS_NONCE_LEN); in wps_process_wsc_nack()
1597 if (attr->enrollee_nonce == NULL || in wps_process_wsc_nack()
1598 os_memcmp(wps->nonce_e, attr->enrollee_nonce, WPS_NONCE_LEN) != 0) { in wps_process_wsc_nack()
1601 attr->enrollee_nonce, WPS_NONCE_LEN); in wps_process_wsc_nack()
1608 if (attr->config_error == NULL) { in wps_process_wsc_nack()
1615 config_error = WPA_GET_BE16(attr->config_error); in wps_process_wsc_nack()
1642 if (attr) in wps_process_wsc_nack()
1643 os_free(attr); in wps_process_wsc_nack()
1660 struct wps_parse_attr attr; in wps_enrollee_process_msg() local
1661 if (wps_parse_msg(msg, &attr) == 0 && attr.msg_type) { in wps_enrollee_process_msg()
1662 if (*attr.msg_type == WPS_WSC_ACK) in wps_enrollee_process_msg()
1664 else if (*attr.msg_type == WPS_WSC_NACK) in wps_enrollee_process_msg()