Lines Matching refs:resp
408 struct wpabuf **resp) in eap_teap_phase2_request() argument
440 *resp = eap_sm_buildIdentity(sm, hdr->identifier, 1); in eap_teap_phase2_request()
454 hdr, resp)) in eap_teap_phase2_request()
471 *resp = data->phase2_method->process(sm, data->phase2_priv, &iret, in eap_teap_phase2_request()
475 if (!(*resp) || in eap_teap_phase2_request()
488 if (!(*resp) && config && in eap_teap_phase2_request()
494 } else if (!(*resp)) in eap_teap_phase2_request()
562 struct wpabuf *resp = NULL; in eap_teap_process_eap_payload_tlv() local
585 if (eap_teap_phase2_request(sm, data, ret, hdr, &resp)) { in eap_teap_process_eap_payload_tlv()
591 resp = eap_teap_tlv_eap_payload(resp); in eap_teap_process_eap_payload_tlv()
593 resp = eap_teap_add_identity_type(sm, resp); in eap_teap_process_eap_payload_tlv()
595 return resp; in eap_teap_process_eap_payload_tlv()
606 struct wpabuf *resp; in eap_teap_process_basic_auth_req() local
622 resp = wpabuf_alloc(sizeof(struct teap_tlv_hdr) + plen); in eap_teap_process_basic_auth_req()
623 if (!resp) in eap_teap_process_basic_auth_req()
625 eap_teap_put_tlv_hdr(resp, TEAP_TLV_BASIC_PASSWORD_AUTH_RESP, plen); in eap_teap_process_basic_auth_req()
626 wpabuf_put_u8(resp, identity_len); in eap_teap_process_basic_auth_req()
627 wpabuf_put_data(resp, identity, identity_len); in eap_teap_process_basic_auth_req()
628 wpabuf_put_u8(resp, password_len); in eap_teap_process_basic_auth_req()
629 wpabuf_put_data(resp, password, password_len); in eap_teap_process_basic_auth_req()
631 resp); in eap_teap_process_basic_auth_req()
633 resp = eap_teap_add_identity_type(sm, resp); in eap_teap_process_basic_auth_req()
639 return resp; in eap_teap_process_basic_auth_req()
824 struct wpabuf *resp; in eap_teap_process_crypto_binding() local
902 resp = wpabuf_alloc(len); in eap_teap_process_crypto_binding()
903 if (!resp) in eap_teap_process_crypto_binding()
911 wpabuf_free(resp); in eap_teap_process_crypto_binding()
916 wpabuf_free(resp); in eap_teap_process_crypto_binding()
920 pos = wpabuf_put(resp, sizeof(struct teap_tlv_crypto_binding)); in eap_teap_process_crypto_binding()
924 wpabuf_free(resp); in eap_teap_process_crypto_binding()
928 return resp; in eap_teap_process_crypto_binding()
1159 struct wpabuf **resp) in eap_teap_parse_decrypted() argument
1195 *resp = eap_teap_tlv_nak(0, tlv_type); in eap_teap_parse_decrypted()
1250 struct wpabuf *resp = NULL, *tmp; in eap_teap_process_decrypted() local
1256 if (eap_teap_parse_decrypted(decrypted, &tlv, &resp) < 0) { in eap_teap_process_decrypted()
1261 if (resp) { in eap_teap_process_decrypted()
1272 resp = eap_teap_tlv_result(TEAP_STATUS_FAILURE, 0); in eap_teap_process_decrypted()
1325 resp = wpabuf_concat(resp, tmp); in eap_teap_process_decrypted()
1368 resp = wpabuf_concat(resp, tmp); in eap_teap_process_decrypted()
1376 resp = wpabuf_concat(resp, tmp); in eap_teap_process_decrypted()
1383 resp = wpabuf_concat(resp, tmp); in eap_teap_process_decrypted()
1413 resp = wpabuf_concat(resp, tmp); in eap_teap_process_decrypted()
1439 resp = wpabuf_concat(resp, tmp); in eap_teap_process_decrypted()
1445 resp = wpabuf_concat(tmp, resp); in eap_teap_process_decrypted()
1449 resp = wpabuf_concat(tmp, resp); in eap_teap_process_decrypted()
1456 resp = wpabuf_concat(tmp, resp); in eap_teap_process_decrypted()
1463 resp = wpabuf_concat(tmp, resp); in eap_teap_process_decrypted()
1466 if (resp && tlv.result == TEAP_STATUS_SUCCESS && !failed && in eap_teap_process_decrypted()
1478 if (!resp) { in eap_teap_process_decrypted()
1481 resp = wpabuf_alloc(1); in eap_teap_process_decrypted()
1485 if (!resp) in eap_teap_process_decrypted()
1488 wpa_hexdump_buf(MSG_DEBUG, "EAP-TEAP: Encrypting Phase 2 data", resp); in eap_teap_process_decrypted()
1491 resp, out_data)) { in eap_teap_process_decrypted()
1495 wpabuf_free(resp); in eap_teap_process_decrypted()
1771 struct wpabuf *resp) in eap_teap_add_stub_outer_tlvs() argument
1781 wpabuf_free(resp); in eap_teap_add_stub_outer_tlvs()
1794 resp); in eap_teap_add_stub_outer_tlvs()
1795 resp2 = wpabuf_alloc(wpabuf_len(resp) + 4 + in eap_teap_add_stub_outer_tlvs()
1798 wpabuf_free(resp); in eap_teap_add_stub_outer_tlvs()
1802 pos = wpabuf_head(resp); in eap_teap_add_stub_outer_tlvs()
1815 wpabuf_free(resp); in eap_teap_add_stub_outer_tlvs()
1824 wpabuf_put_data(resp2, pos, wpabuf_len(resp) - 6); in eap_teap_add_stub_outer_tlvs()
1827 wpabuf_free(resp); in eap_teap_add_stub_outer_tlvs()
1844 struct wpabuf *resp; in eap_teap_process() local
1877 resp = NULL; in eap_teap_process()
1881 res = eap_teap_decrypt(sm, data, ret, id, &msg, &resp); in eap_teap_process()
1899 resp = data->pending_resp; in eap_teap_process()
1902 return resp; in eap_teap_process()
1924 &resp); in eap_teap_process()
1930 return resp; in eap_teap_process()
1937 data->pending_resp = resp; in eap_teap_process()
1971 wpabuf_free(resp); in eap_teap_process()
1981 data->pending_phase2_req = resp; in eap_teap_process()
1982 resp = NULL; in eap_teap_process()
1983 res = eap_teap_decrypt(sm, data, ret, id, &msg, &resp); in eap_teap_process()
1988 wpabuf_free(resp); in eap_teap_process()
1994 if (data->test_outer_tlvs && res == 0 && resp && in eap_teap_process()
1995 (flags & EAP_TLS_FLAGS_START) && wpabuf_len(resp) >= 6) in eap_teap_process()
1996 resp = eap_teap_add_stub_outer_tlvs(data, resp); in eap_teap_process()
1999 return resp; in eap_teap_process()