static int eap_fast_process_decrypted(struct eap_sm *sm,
struct eap_fast_data *data,
struct eap_method_ret *ret,
- const struct eap_hdr *req,
+ u8 identifier,
struct wpabuf *decrypted,
struct wpabuf **out_data)
{
return 0;
if (resp)
return eap_fast_encrypt_response(sm, data, resp,
- req->identifier, out_data);
+ identifier, out_data);
if (tlv.result == EAP_TLV_RESULT_FAILURE) {
resp = eap_fast_tlv_result(EAP_TLV_RESULT_FAILURE, 0);
return eap_fast_encrypt_response(sm, data, resp,
- req->identifier, out_data);
+ identifier, out_data);
}
if (tlv.iresult == EAP_TLV_RESULT_FAILURE) {
resp = eap_fast_tlv_result(EAP_TLV_RESULT_FAILURE, 1);
return eap_fast_encrypt_response(sm, data, resp,
- req->identifier, out_data);
+ identifier, out_data);
}
if (tlv.crypto_binding) {
resp = wpabuf_alloc(1);
}
- return eap_fast_encrypt_response(sm, data, resp, req->identifier,
+ return eap_fast_encrypt_response(sm, data, resp, identifier,
out_data);
}
static int eap_fast_decrypt(struct eap_sm *sm, struct eap_fast_data *data,
- struct eap_method_ret *ret,
- const struct eap_hdr *req,
+ struct eap_method_ret *ret, u8 identifier,
const struct wpabuf *in_data,
struct wpabuf **out_data)
{
/* Received TLS ACK - requesting more fragments */
return eap_peer_tls_encrypt(sm, &data->ssl, EAP_TYPE_FAST,
data->fast_version,
- req->identifier, NULL, out_data);
+ identifier, NULL, out_data);
}
res = eap_peer_tls_decrypt(sm, &data->ssl, in_data, &in_decrypted);
return -1;
}
- res = eap_fast_process_decrypted(sm, data, ret, req,
+ res = eap_fast_process_decrypted(sm, data, ret, identifier,
in_decrypted, out_data);
wpabuf_free(in_decrypted);
/* Process tunneled (encrypted) phase 2 data. */
struct wpabuf msg;
wpabuf_set(&msg, pos, left);
- res = eap_fast_decrypt(sm, data, ret, req, &msg, &resp);
+ res = eap_fast_decrypt(sm, data, ret, id, &msg, &resp);
if (res < 0) {
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
data->pending_phase2_req = resp;
resp = NULL;
wpabuf_set(&msg, pos, left);
- res = eap_fast_decrypt(sm, data, ret, req, &msg,
- &resp);
+ res = eap_fast_decrypt(sm, data, ret, id, &msg, &resp);
}
}