Lines Matching refs:parse
148 static int eap_ttls_avp_parse(struct wpabuf *buf, struct eap_ttls_avp *parse)
156 os_memset(parse, 0, sizeof(*parse));
200 if (parse->eap == NULL) {
201 parse->eap = os_malloc(dlen);
202 if (parse->eap == NULL) {
208 os_memcpy(parse->eap, dpos, dlen);
209 parse->eap_len = dlen;
211 u8 *neweap = os_realloc(parse->eap,
212 parse->eap_len + dlen);
219 os_memcpy(neweap + parse->eap_len, dpos, dlen);
220 parse->eap = neweap;
221 parse->eap_len += dlen;
227 parse->user_name = dpos;
228 parse->user_name_len = dlen;
240 parse->user_password = password;
241 parse->user_password_len = password_len;
247 parse->chap_challenge = dpos;
248 parse->chap_challenge_len = dlen;
254 parse->chap_password = dpos;
255 parse->chap_password_len = dlen;
261 parse->mschap_challenge = dpos;
262 parse->mschap_challenge_len = dlen;
268 parse->mschap_response = dpos;
269 parse->mschap_response_len = dlen;
275 parse->mschap2_response = dpos;
276 parse->mschap2_response_len = dlen;
296 os_free(parse->eap);
297 parse->eap = NULL;
951 struct eap_ttls_avp parse;
979 if (eap_ttls_avp_parse(in_decrypted, &parse) < 0) {
980 wpa_printf(MSG_DEBUG, "EAP-TTLS: Failed to parse AVPs");
986 if (parse.user_name) {
988 sm->identity = os_malloc(parse.user_name_len);
993 os_memcpy(sm->identity, parse.user_name, parse.user_name_len);
994 sm->identity_len = parse.user_name_len;
995 if (eap_user_get(sm, parse.user_name, parse.user_name_len, 1)
1005 if (data->tnc_started && parse.eap == NULL) {
1013 if (parse.eap) {
1014 eap_ttls_process_phase2_eap(sm, data, parse.eap,
1015 parse.eap_len);
1016 } else if (parse.user_password) {
1017 eap_ttls_process_phase2_pap(sm, data, parse.user_password,
1018 parse.user_password_len);
1019 } else if (parse.chap_password) {
1021 parse.chap_challenge,
1022 parse.chap_challenge_len,
1023 parse.chap_password,
1024 parse.chap_password_len);
1025 } else if (parse.mschap_response) {
1027 parse.mschap_challenge,
1028 parse.mschap_challenge_len,
1029 parse.mschap_response,
1030 parse.mschap_response_len);
1031 } else if (parse.mschap2_response) {
1033 parse.mschap_challenge,
1034 parse.mschap_challenge_len,
1035 parse.mschap2_response,
1036 parse.mschap2_response_len);
1041 os_free(parse.eap);