3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

eap-wsc: store sent pdu

This is needed for authenticator computation
This commit is contained in:
Denis Kenzior 2016-08-28 02:49:57 -05:00
parent 2cbbcb7434
commit c2cb35b4c9

View File

@ -41,12 +41,22 @@ static struct l_key *dh5_prime;
struct eap_wsc_state {
struct wsc_m1 *m1;
uint8_t *sent_pdu;
size_t sent_len;
struct l_key *private;
char *device_password;
uint8_t e_snonce1[16];
uint8_t e_snonce2[16];
};
static inline void eap_wsc_state_set_sent_pdu(struct eap_wsc_state *wsc,
uint8_t *pdu, size_t len)
{
l_free(wsc->sent_pdu);
wsc->sent_pdu = pdu;
wsc->sent_len = len;
}
static int eap_wsc_probe(struct eap_state *eap, const char *name)
{
struct eap_wsc_state *wsc;
@ -69,6 +79,11 @@ static void eap_wsc_remove(struct eap_state *eap)
l_free(wsc->device_password);
l_key_free(wsc->private);
l_free(wsc->sent_pdu);
wsc->sent_pdu = 0;
wsc->sent_len = 0;
l_free(wsc->m1);
l_free(wsc);
}