Lines Matching refs:parse
887 struct ttls_parse_avp *parse) in eap_ttls_parse_attr_eap() argument
890 if (parse->eapdata == NULL) { in eap_ttls_parse_attr_eap()
891 parse->eapdata = os_memdup(dpos, dlen); in eap_ttls_parse_attr_eap()
892 if (parse->eapdata == NULL) { in eap_ttls_parse_attr_eap()
897 parse->eap_len = dlen; in eap_ttls_parse_attr_eap()
899 u8 *neweap = os_realloc(parse->eapdata, parse->eap_len + dlen); in eap_ttls_parse_attr_eap()
905 os_memcpy(neweap + parse->eap_len, dpos, dlen); in eap_ttls_parse_attr_eap()
906 parse->eapdata = neweap; in eap_ttls_parse_attr_eap()
907 parse->eap_len += dlen; in eap_ttls_parse_attr_eap()
915 struct ttls_parse_avp *parse) in eap_ttls_parse_avp() argument
962 if (eap_ttls_parse_attr_eap(dpos, dlen, parse) < 0) in eap_ttls_parse_avp()
980 parse->mschapv2 = dpos; in eap_ttls_parse_avp()
985 parse->mschapv2_error = 1; in eap_ttls_parse_avp()
1002 struct ttls_parse_avp *parse) in eap_ttls_parse_avps() argument
1020 os_memset(parse, 0, sizeof(*parse)); in eap_ttls_parse_avps()
1023 avp_length = eap_ttls_parse_avp(pos, left, parse); in eap_ttls_parse_avps()
1090 struct ttls_parse_avp *parse, in eap_ttls_process_phase2_eap() argument
1096 if (parse->eapdata == NULL) { in eap_ttls_process_phase2_eap()
1103 parse->eapdata, parse->eap_len); in eap_ttls_process_phase2_eap()
1104 hdr = (struct eap_hdr *) parse->eapdata; in eap_ttls_process_phase2_eap()
1106 if (parse->eap_len < sizeof(*hdr)) { in eap_ttls_process_phase2_eap()
1109 (unsigned long) parse->eap_len, in eap_ttls_process_phase2_eap()
1114 if (len > parse->eap_len) { in eap_ttls_process_phase2_eap()
1119 (unsigned long) parse->eap_len); in eap_ttls_process_phase2_eap()
1146 struct ttls_parse_avp *parse) in eap_ttls_process_phase2_mschapv2() argument
1149 if (parse->mschapv2_error) { in eap_ttls_process_phase2_mschapv2()
1158 if (parse->mschapv2 == NULL) { in eap_ttls_process_phase2_mschapv2()
1160 if (data->phase2_success && parse->eapdata) { in eap_ttls_process_phase2_mschapv2()
1172 if (parse->mschapv2[0] != data->ident) { in eap_ttls_process_phase2_mschapv2()
1175 parse->mschapv2[0], data->ident); in eap_ttls_process_phase2_mschapv2()
1180 parse->mschapv2 + 1, 42)) { in eap_ttls_process_phase2_mschapv2()
1208 struct ttls_parse_avp *parse, in eap_ttls_process_tnc_start() argument
1212 if (parse->eapdata == NULL) { in eap_ttls_process_tnc_start()
1228 if (eap_ttls_process_phase2_eap(sm, data, ret, parse, resp) < 0) in eap_ttls_process_tnc_start()
1240 struct ttls_parse_avp *parse, in eap_ttls_process_decrypted() argument
1256 if (eap_ttls_process_phase2_eap(sm, data, ret, parse, &resp) < in eap_ttls_process_decrypted()
1261 res = eap_ttls_process_phase2_mschapv2(sm, data, ret, parse); in eap_ttls_process_decrypted()
1263 if (res == 1 && parse->eapdata && data->phase2_success) { in eap_ttls_process_decrypted()
1270 if (eap_ttls_process_tnc_start(sm, data, ret, parse, in eap_ttls_process_decrypted()
1280 if (eap_ttls_process_tnc_start(sm, data, ret, parse, &resp) < in eap_ttls_process_decrypted()
1401 struct ttls_parse_avp parse; in eap_ttls_decrypt() local
1403 os_memset(&parse, 0, sizeof(parse)); in eap_ttls_decrypt()
1445 if (eap_ttls_parse_avps(in_decrypted, &parse) < 0) { in eap_ttls_decrypt()
1451 &parse, in_decrypted, out_data); in eap_ttls_decrypt()
1455 os_free(parse.eapdata); in eap_ttls_decrypt()