mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-24 06:52:37 +01:00
eapol: Add __eapol_set_install_tk_func
This commit is contained in:
parent
ddcbb3f2a8
commit
bf5a6a3999
@ -42,6 +42,7 @@
|
||||
struct l_queue *state_machines;
|
||||
eapol_tx_packet_func_t tx_packet = NULL;
|
||||
eapol_get_nonce_func_t get_nonce = NULL;
|
||||
eapol_install_tk_func_t install_tk = NULL;
|
||||
enum eapol_protocol_version protocol_version = EAPOL_PROTOCOL_VERSION_2004;
|
||||
|
||||
#define VERIFY_IS_ZERO(field) \
|
||||
@ -746,6 +747,9 @@ static void eapol_handle_ptk_3_of_4(uint32_t ifindex,
|
||||
memcpy(step4->key_mic_data, mic, sizeof(mic));
|
||||
tx_packet(ifindex, sm->aa, sm->spa, step4, user_data);
|
||||
|
||||
if (install_tk)
|
||||
install_tk(sm->ifindex, sm->aa, ptk->tk, rsne, sm->user_data);
|
||||
|
||||
fail:
|
||||
l_free(step4);
|
||||
}
|
||||
@ -867,6 +871,11 @@ void __eapol_set_protocol_version(enum eapol_protocol_version version)
|
||||
protocol_version = version;
|
||||
}
|
||||
|
||||
void __eapol_set_install_tk_func(eapol_install_tk_func_t func)
|
||||
{
|
||||
install_tk = func;
|
||||
}
|
||||
|
||||
struct l_io *eapol_open_pae(uint32_t index)
|
||||
{
|
||||
struct l_io *io;
|
||||
|
@ -99,6 +99,9 @@ typedef int (*eapol_tx_packet_func_t)(uint32_t ifindex, const uint8_t *aa,
|
||||
const uint8_t *spa, const struct eapol_key *ek,
|
||||
void *user_data);
|
||||
typedef bool (*eapol_get_nonce_func_t)(uint8_t nonce[]);
|
||||
typedef void (*eapol_install_tk_func_t)(uint32_t ifindex, const uint8_t *aa,
|
||||
const uint8_t *tk, const uint8_t *rsn,
|
||||
void *user_data);
|
||||
|
||||
bool eapol_calculate_mic(const uint8_t *kck, const struct eapol_key *frame,
|
||||
uint8_t *mic);
|
||||
@ -135,6 +138,7 @@ void __eapol_rx_packet(uint32_t ifindex, const uint8_t *spa, const uint8_t *aa,
|
||||
void __eapol_set_tx_packet_func(eapol_tx_packet_func_t func);
|
||||
void __eapol_set_get_nonce_func(eapol_get_nonce_func_t func);
|
||||
void __eapol_set_protocol_version(enum eapol_protocol_version version);
|
||||
void __eapol_set_install_tk_func(eapol_install_tk_func_t func);
|
||||
|
||||
struct eapol_sm *eapol_sm_new();
|
||||
void eapol_sm_free(struct eapol_sm *sm);
|
||||
|
Loading…
Reference in New Issue
Block a user