Lines Matching full:attr
640 struct wps_parse_attr attr;
647 if (wps_parse_msg(&msg, &attr) < 0 ||
648 wps_process_cred(&attr, &wps->cred))
738 struct wps_parse_attr *attr,
746 if (wps_process_ap_settings(attr, &cred) < 0)
884 struct wps_parse_attr *attr)
895 if (wps_process_registrar_nonce(wps, attr->registrar_nonce) ||
896 wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
897 wps_process_uuid_r(wps, attr->uuid_r) ||
898 wps_process_dev_pw_id(wps, attr->dev_password_id)) {
919 if (wps_process_pubkey(wps, attr->public_key, attr->public_key_len) ||
920 wps_process_authenticator(wps, attr->authenticator, msg) ||
921 wps_process_device_attrs(&wps->peer_dev, attr)) {
932 struct wps_parse_attr *attr)
944 attr->manufacturer, attr->manufacturer_len);
946 attr->model_name, attr->model_name_len);
948 attr->model_number, attr->model_number_len);
950 attr->serial_number, attr->serial_number_len);
952 attr->dev_name, attr->dev_name_len);
958 if (attr->config_methods)
960 WPA_GET_BE16(attr->config_methods);
961 m2d->manufacturer = attr->manufacturer;
962 m2d->manufacturer_len = attr->manufacturer_len;
963 m2d->model_name = attr->model_name;
964 m2d->model_name_len = attr->model_name_len;
965 m2d->model_number = attr->model_number;
966 m2d->model_number_len = attr->model_number_len;
967 m2d->serial_number = attr->serial_number;
968 m2d->serial_number_len = attr->serial_number_len;
969 m2d->dev_name = attr->dev_name;
970 m2d->dev_name_len = attr->dev_name_len;
971 m2d->primary_dev_type = attr->primary_dev_type;
972 if (attr->config_error)
974 WPA_GET_BE16(attr->config_error);
975 if (attr->dev_password_id)
977 WPA_GET_BE16(attr->dev_password_id);
988 struct wps_parse_attr *attr)
1002 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
1003 wps_process_authenticator(wps, attr->authenticator, msg) ||
1004 wps_process_r_hash1(wps, attr->r_hash1) ||
1005 wps_process_r_hash2(wps, attr->r_hash2)) {
1010 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
1011 attr->encr_settings_len);
1019 if (wps_validate_m4_encr(decrypted, attr->version2 != NULL) < 0) {
1043 struct wps_parse_attr *attr)
1057 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
1058 wps_process_authenticator(wps, attr->authenticator, msg)) {
1063 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
1064 attr->encr_settings_len);
1072 if (wps_validate_m6_encr(decrypted, attr->version2 != NULL) < 0) {
1100 struct wps_parse_attr *attr)
1114 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
1115 wps_process_authenticator(wps, attr->authenticator, msg)) {
1133 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
1134 attr->encr_settings_len);
1143 attr->version2 != NULL) < 0) {
1154 eattr.num_cred, attr->version2 != NULL) ||
1156 attr->version2 != NULL)) {
1171 struct wps_parse_attr attr;
1176 if (wps_parse_msg(msg, &attr) < 0)
1179 if (attr.enrollee_nonce == NULL ||
1180 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
1185 if (attr.msg_type == NULL) {
1191 switch (*attr.msg_type) {
1195 ret = wps_process_m2(wps, msg, &attr);
1200 ret = wps_process_m2d(wps, &attr);
1205 ret = wps_process_m4(wps, msg, &attr);
1214 ret = wps_process_m6(wps, msg, &attr);
1223 ret = wps_process_m8(wps, msg, &attr);
1231 *attr.msg_type);
1242 if (ret == WPS_CONTINUE && *attr.msg_type != WPS_M2D) {
1256 struct wps_parse_attr attr;
1260 if (wps_parse_msg(msg, &attr) < 0)
1263 if (attr.msg_type == NULL) {
1268 if (*attr.msg_type != WPS_WSC_ACK) {
1270 *attr.msg_type);
1274 if (attr.registrar_nonce == NULL ||
1275 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
1281 if (attr.enrollee_nonce == NULL ||
1282 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
1302 struct wps_parse_attr attr;
1307 if (wps_parse_msg(msg, &attr) < 0)
1310 if (attr.msg_type == NULL) {
1315 if (*attr.msg_type != WPS_WSC_NACK) {
1317 *attr.msg_type);
1321 if (attr.registrar_nonce == NULL ||
1322 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
1326 attr.registrar_nonce, WPS_NONCE_LEN);
1332 if (attr.enrollee_nonce == NULL ||
1333 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
1336 attr.enrollee_nonce, WPS_NONCE_LEN);
1342 if (attr.config_error == NULL) {
1348 config_error = WPA_GET_BE16(attr.config_error);
1388 struct wps_parse_attr attr;
1389 if (wps_parse_msg(msg, &attr) == 0 && attr.msg_type) {
1390 if (*attr.msg_type == WPS_WSC_ACK)
1392 else if (*attr.msg_type == WPS_WSC_NACK)