int wps_process_cred(struct wps_parse_attr *attr, struct wps_credential *cred) { wpa_printf(MSG_DEBUG, "WPS: Process Credential"); /* TODO: support multiple Network Keys */ if (wps_process_cred_network_idx(cred, attr->network_idx) || wps_process_cred_ssid(cred, attr->ssid, attr->ssid_len) || wps_process_cred_auth_type(cred, attr->auth_type) || wps_process_cred_encr_type(cred, attr->encr_type) || wps_process_cred_network_key_idx(cred, attr->network_key_idx) || wps_process_cred_network_key(cred, attr->network_key, attr->network_key_len) || wps_process_cred_mac_addr(cred, attr->mac_addr) || wps_process_cred_eap_type(cred, attr->eap_type, attr->eap_type_len) || wps_process_cred_eap_identity(cred, attr->eap_identity, attr->eap_identity_len) || wps_process_cred_key_prov_auto(cred, attr->key_prov_auto) || wps_process_cred_802_1x_enabled(cred, attr->dot1x_enabled) || wps_process_cred_ap_channel(cred, attr->ap_channel)) return -1; return wps_workaround_cred_key(cred); }
int wps_process_ap_settings(struct wps_parse_attr *attr, struct wps_credential *cred) { wpa_printf(MSG_DEBUG, "WPS: Processing AP Settings"); os_memset(cred, 0, sizeof(*cred)); /* TODO: optional attributes New Password and Device Password ID */ if (wps_process_cred_ssid(cred, attr->ssid, attr->ssid_len) || wps_process_cred_auth_type(cred, attr->auth_type) || wps_process_cred_encr_type(cred, attr->encr_type) || wps_process_cred_network_key_idx(cred, attr->network_key_idx) || wps_process_cred_network_key(cred, attr->network_key, attr->network_key_len) || wps_process_cred_mac_addr(cred, attr->mac_addr)) return -1; return wps_workaround_cred_key(cred); }
int wps_process_cred(struct wps_parse_attr *attr, struct wps_credential *cred) { wpa_printf(MSG_DEBUG, "WPS: Process Credential"); /* TODO: support multiple Network Keys */ if (wps_process_cred_network_idx(cred, attr->network_idx) || wps_process_cred_ssid(cred, attr->ssid, attr->ssid_len) || wps_process_cred_auth_type(cred, attr->auth_type) || wps_process_cred_encr_type(cred, attr->encr_type) || wps_process_cred_network_key_idx(cred, attr->network_key_idx) || wps_process_cred_network_key(cred, attr->network_key, attr->network_key_len) || wps_process_cred_mac_addr(cred, attr->mac_addr)) return -1; return wps_workaround_cred_key(cred); }