Lines Matching refs:parse

178 static int eap_ttls_avp_parse(struct wpabuf *buf, struct eap_ttls_avp *parse)  in eap_ttls_avp_parse()  argument
186 os_memset(parse, 0, sizeof(*parse)); in eap_ttls_avp_parse()
230 if (parse->eap == NULL) { in eap_ttls_avp_parse()
231 parse->eap = os_memdup(dpos, dlen); in eap_ttls_avp_parse()
232 if (parse->eap == NULL) { in eap_ttls_avp_parse()
238 parse->eap_len = dlen; in eap_ttls_avp_parse()
240 u8 *neweap = os_realloc(parse->eap, in eap_ttls_avp_parse()
241 parse->eap_len + dlen); in eap_ttls_avp_parse()
248 os_memcpy(neweap + parse->eap_len, dpos, dlen); in eap_ttls_avp_parse()
249 parse->eap = neweap; in eap_ttls_avp_parse()
250 parse->eap_len += dlen; in eap_ttls_avp_parse()
256 parse->user_name = dpos; in eap_ttls_avp_parse()
257 parse->user_name_len = dlen; in eap_ttls_avp_parse()
269 parse->user_password = password; in eap_ttls_avp_parse()
270 parse->user_password_len = password_len; in eap_ttls_avp_parse()
276 parse->chap_challenge = dpos; in eap_ttls_avp_parse()
277 parse->chap_challenge_len = dlen; in eap_ttls_avp_parse()
283 parse->chap_password = dpos; in eap_ttls_avp_parse()
284 parse->chap_password_len = dlen; in eap_ttls_avp_parse()
290 parse->mschap_challenge = dpos; in eap_ttls_avp_parse()
291 parse->mschap_challenge_len = dlen; in eap_ttls_avp_parse()
297 parse->mschap_response = dpos; in eap_ttls_avp_parse()
298 parse->mschap_response_len = dlen; in eap_ttls_avp_parse()
304 parse->mschap2_response = dpos; in eap_ttls_avp_parse()
305 parse->mschap2_response_len = dlen; in eap_ttls_avp_parse()
325 os_free(parse->eap); in eap_ttls_avp_parse()
326 parse->eap = NULL; in eap_ttls_avp_parse()
1018 struct eap_ttls_avp parse; in eap_ttls_process_phase2() local
1046 if (eap_ttls_avp_parse(in_decrypted, &parse) < 0) { in eap_ttls_process_phase2()
1053 if (parse.user_name) { in eap_ttls_process_phase2()
1055 nbuf = os_malloc(parse.user_name_len * 4 + 1); in eap_ttls_process_phase2()
1057 printf_encode(nbuf, parse.user_name_len * 4 + 1, in eap_ttls_process_phase2()
1058 parse.user_name, in eap_ttls_process_phase2()
1059 parse.user_name_len); in eap_ttls_process_phase2()
1065 sm->identity = os_memdup(parse.user_name, parse.user_name_len); in eap_ttls_process_phase2()
1070 sm->identity_len = parse.user_name_len; in eap_ttls_process_phase2()
1071 if (eap_user_get(sm, parse.user_name, parse.user_name_len, 1) in eap_ttls_process_phase2()
1081 if (data->tnc_started && parse.eap == NULL) { in eap_ttls_process_phase2()
1089 if (parse.eap) { in eap_ttls_process_phase2()
1090 eap_ttls_process_phase2_eap(sm, data, parse.eap, in eap_ttls_process_phase2()
1091 parse.eap_len); in eap_ttls_process_phase2()
1092 } else if (parse.user_password) { in eap_ttls_process_phase2()
1093 eap_ttls_process_phase2_pap(sm, data, parse.user_password, in eap_ttls_process_phase2()
1094 parse.user_password_len); in eap_ttls_process_phase2()
1095 } else if (parse.chap_password) { in eap_ttls_process_phase2()
1097 parse.chap_challenge, in eap_ttls_process_phase2()
1098 parse.chap_challenge_len, in eap_ttls_process_phase2()
1099 parse.chap_password, in eap_ttls_process_phase2()
1100 parse.chap_password_len); in eap_ttls_process_phase2()
1101 } else if (parse.mschap_response) { in eap_ttls_process_phase2()
1103 parse.mschap_challenge, in eap_ttls_process_phase2()
1104 parse.mschap_challenge_len, in eap_ttls_process_phase2()
1105 parse.mschap_response, in eap_ttls_process_phase2()
1106 parse.mschap_response_len); in eap_ttls_process_phase2()
1107 } else if (parse.mschap2_response) { in eap_ttls_process_phase2()
1109 parse.mschap_challenge, in eap_ttls_process_phase2()
1110 parse.mschap_challenge_len, in eap_ttls_process_phase2()
1111 parse.mschap2_response, in eap_ttls_process_phase2()
1112 parse.mschap2_response_len); in eap_ttls_process_phase2()
1117 os_free(parse.eap); in eap_ttls_process_phase2()