Lines Matching refs:attr
644 attr;
650 if (wps_parse_msg(&msg, &attr) < 0 ||
651 wps_process_cred(&attr, &wps->cred))
741 struct wps_parse_attr *attr,
749 if (wps_process_ap_settings(attr, &cred) < 0)
836 struct wps_parse_attr *attr)
847 if (wps_process_registrar_nonce(wps, attr->registrar_nonce) ||
848 wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
849 wps_process_uuid_r(wps, attr->uuid_r)) {
870 if (wps_process_pubkey(wps, attr->public_key, attr->public_key_len) ||
871 wps_process_authenticator(wps, attr->authenticator, msg) ||
872 wps_process_device_attrs(&wps->peer_dev, attr)) {
883 struct wps_parse_attr *attr)
895 attr->manufacturer, attr->manufacturer_len);
897 attr->model_name, attr->model_name_len);
899 attr->model_number, attr->model_number_len);
901 attr->serial_number, attr->serial_number_len);
903 attr->dev_name, attr->dev_name_len);
909 if (attr->config_methods)
911 WPA_GET_BE16(attr->config_methods);
912 m2d->manufacturer = attr->manufacturer;
913 m2d->manufacturer_len = attr->manufacturer_len;
914 m2d->model_name = attr->model_name;
915 m2d->model_name_len = attr->model_name_len;
916 m2d->model_number = attr->model_number;
917 m2d->model_number_len = attr->model_number_len;
918 m2d->serial_number = attr->serial_number;
919 m2d->serial_number_len = attr->serial_number_len;
920 m2d->dev_name = attr->dev_name;
921 m2d->dev_name_len = attr->dev_name_len;
922 m2d->primary_dev_type = attr->primary_dev_type;
923 if (attr->config_error)
925 WPA_GET_BE16(attr->config_error);
926 if (attr->dev_password_id)
928 WPA_GET_BE16(attr->dev_password_id);
939 struct wps_parse_attr *attr)
953 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
954 wps_process_authenticator(wps, attr->authenticator, msg) ||
955 wps_process_r_hash1(wps, attr->r_hash1) ||
956 wps_process_r_hash2(wps, attr->r_hash2)) {
961 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
962 attr->encr_settings_len);
970 if (wps_validate_m4_encr(decrypted, attr->version2 != 0) < 0) {
994 struct wps_parse_attr *attr)
1008 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
1009 wps_process_authenticator(wps, attr->authenticator, msg)) {
1014 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
1015 attr->encr_settings_len);
1023 if (wps_validate_m6_encr(decrypted, attr->version2 != 0) < 0) {
1047 struct wps_parse_attr *attr)
1061 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
1062 wps_process_authenticator(wps, attr->authenticator, msg)) {
1080 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
1081 attr->encr_settings_len);
1089 if (wps_validate_m8_encr(decrypted, wps->wps->ap, attr->version2 != 0)
1101 eattr.num_cred, attr->version2 != NULL) ||
1103 attr->version2 != NULL)) {
1118 struct wps_parse_attr attr;
1123 if (wps_parse_msg(msg, &attr) < 0)
1126 if (attr.enrollee_nonce == NULL ||
1127 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
1132 if (attr.msg_type == NULL) {
1138 switch (*attr.msg_type) {
1142 ret = wps_process_m2(wps, msg, &attr);
1147 ret = wps_process_m2d(wps, &attr);
1152 ret = wps_process_m4(wps, msg, &attr);
1160 ret = wps_process_m6(wps, msg, &attr);
1168 ret = wps_process_m8(wps, msg, &attr);
1175 *attr.msg_type);
1186 if (ret == WPS_CONTINUE && *attr.msg_type != WPS_M2D) {
1200 struct wps_parse_attr attr;
1204 if (wps_parse_msg(msg, &attr) < 0)
1207 if (attr.msg_type == NULL) {
1212 if (*attr.msg_type != WPS_WSC_ACK) {
1214 *attr.msg_type);
1218 if (attr.registrar_nonce == NULL ||
1219 os_memcmp(wps->nonce_r, attr
1225 if (attr.enrollee_nonce == NULL ||
1226 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
1246 struct wps_parse_attr attr;
1251 if (wps_parse_msg(msg, &attr) < 0)
1254 if (attr.msg_type == NULL) {
1259 if (*attr.msg_type != WPS_WSC_NACK) {
1261 *attr.msg_type);
1265 if (attr.registrar_nonce == NULL ||
1266 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN != 0))
1270 attr.registrar_nonce, WPS_NONCE_LEN);
1276 if (attr.enrollee_nonce == NULL ||
1277 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
1280 attr.enrollee_nonce, WPS_NONCE_LEN);
1286 if (attr.config_error == NULL) {
1292 config_error = WPA_GET_BE16(attr.config_error);
1332 struct wps_parse_attr attr;
1333 if (wps_parse_msg(msg, &attr) == 0 && attr.msg_type) {
1334 if (*attr.msg_type == WPS_WSC_ACK)
1336 else if (*attr.msg_type == WPS_WSC_NACK)