Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching full:data

43 	/* followed by data */
46 /* Response Data field */
54 /* Change-Password Data field */
115 struct eap_mschapv2_data *data;
116 data = os_zalloc(sizeof(*data));
117 if (data == NULL)
120 data->full_key = sm->mschapv2_full_key;
123 data->full_key = 1;
124 data->peer_challenge = os_malloc(MSCHAPV2_CHAL_LEN);
125 if (data->peer_challenge == NULL) {
126 eap_mschapv2_deinit(sm, data);
129 os_memcpy(data->peer_challenge, sm->peer_challenge,
134 data->auth_challenge = os_malloc(MSCHAPV2_CHAL_LEN);
135 if (data->auth_challenge == NULL) {
136 eap_mschapv2_deinit(sm, data);
139 os_memcpy(data->auth_challenge, sm->auth_challenge,
143 data->phase2 = sm->init_phase2;
145 return data;
151 struct eap_mschapv2_data *data = priv;
152 os_free(data->peer_challenge);
153 os_free(data->auth_challenge);
154 os_free(data->prev_challenge);
155 os_free(data);
181 struct eap_mschapv2_data *data,
207 data->auth_response);
208 data->auth_response_valid = 1;
210 /* Likewise, generate master_key here since we have the needed data
214 get_master_key(password_hash_hash, nt_response, data->master_key);
215 data->master_key_valid = 1;
220 struct eap_mschapv2_data *data, u8 id,
252 if (data->prev_error) {
268 if (data->peer_challenge) {
271 peer_challenge = data->peer_challenge;
278 if (data->auth_challenge) {
281 auth_challenge = data->auth_challenge;
283 eap_mschapv2_derive_response(data, username, username_len,
300 * @data: Pointer to private EAP method data from eap_mschapv2_init()
303 * @req_len: Length of the EAP-MSCHAPv2 data
310 struct eap_mschapv2_data *data,
324 wpa_printf(MSG_INFO, "EAP-MSCHAPV2: Too short challenge data "
347 if (data->passwd_change_challenge_valid) {
350 challenge = data->passwd_change_challenge;
363 return eap_mschapv2_challenge_reply(sm, data, id, req->mschapv2_id,
369 struct eap_mschapv2_data *data)
376 data->prev_error = 0;
389 * @data: Pointer to private EAP method data from eap_mschapv2_init()
392 * @req_len: Length of the EAP-MSCHAPv2 data
399 struct eap_mschapv2_data *data,
414 if (!data->auth_response_valid || len < 42 ||
417 os_memcmp(data->auth_response, recv_response, 20) != 0) {
451 data->success = 1;
453 if (data->prev_error == ERROR_PASSWD_EXPIRED)
454 eap_mschapv2_password_changed(sm, data);
461 struct eap_mschapv2_data *data, char *txt)
475 data->prev_error = atoi(pos);
477 data->prev_error);
498 if (hexstr2bin(pos, data->passwd_change_challenge,
505 data->passwd_change_challenge,
507 data->passwd_change_challenge_valid = 1;
523 data->passwd_change_version = atoi(pos);
525 "protocol version %d", data->passwd_change_version);
538 msg, retry == 1 ? "" : "not ", data->prev_error);
539 if (data->prev_error == ERROR_PASSWD_EXPIRED &&
540 data->passwd_change_version == 3 && config) {
564 struct eap_mschapv2_data *data,
623 data->passwd_change_challenge, PASSWD_CHANGE_CHAL_LEN);
630 generate_nt_response(data->passwd_change_challenge, cp->peer_challenge,
641 data->passwd_change_challenge,
643 cp->nt_response, data->auth_response);
644 data->auth_response_valid = 1;
659 * @data: Pointer to private EAP method data from eap_mschapv2_init()
662 * @req_len: Length of the EAP-MSCHAPv2 data
669 struct eap_mschapv2_data *data,
683 wpa_hexdump_ascii(MSG_DEBUG, "EAP-MSCHAPV2: Failure data",
694 retry = eap_mschapv2_failure_txt(sm, data, buf);
703 if (data->prev_error == ERROR_PASSWD_EXPIRED &&
704 data->passwd_change_version == 3) {
707 return eap_mschapv2_change_password(sm, data, ret, req,
711 } else if (retry && data->prev_error == ERROR_AUTHENTICATION_FAILURE) {
776 static void eap_mschapv2_copy_challenge(struct eap_mschapv2_data *data,
783 os_free(data->prev_challenge);
784 data->prev_challenge = os_malloc(reqDataLen);
785 if (data->prev_challenge) {
786 data->prev_challenge_len = reqDataLen;
787 os_memcpy(data->prev_challenge, reqData, reqDataLen);
795 * @priv: Pointer to private EAP method data from eap_mschapv2_init()
808 struct eap_mschapv2_data *data = priv;
821 if (config->mschapv2_retry && data->prev_challenge &&
822 data->prev_error == ERROR_AUTHENTICATION_FAILURE) {
826 reqData = data->prev_challenge;
827 reqDataLen = data->prev_challenge_len;
852 eap_mschapv2_copy_challenge(data, reqData, reqDataLen);
853 return eap_mschapv2_challenge(sm, data, ret, ms, len,
856 return eap_mschapv2_success(sm, data, ret, ms, len,
859 return eap_mschapv2_failure(sm, data, ret, ms, len,
872 struct eap_mschapv2_data *data = priv;
873 return data->success && data->master_key_valid;
879 struct eap_mschapv2_data *data = priv;
883 if (!data->master_key_valid || !data->success)
886 if (data->full_key) {
897 if (data->full_key) {
898 get_asymetric_start_key(data->master_key, key,
900 get_asymetric_start_key(data->master_key,
904 get_asymetric_start_key(data->master_key, key,