eapol: Add default nonce generator

This commit is contained in:
Denis Kenzior 2015-03-20 12:31:14 -05:00
parent 35e3de9cdf
commit d78883a068
1 changed files with 6 additions and 0 deletions

View File

@ -924,10 +924,16 @@ static int eapol_write(uint32_t ifindex, const uint8_t *aa, const uint8_t *spa,
return 0;
}
static bool eapol_get_nonce(uint8_t nonce[])
{
return l_getrandom(nonce, 32);
}
bool eapol_init()
{
state_machines = l_queue_new();
protocol_version = EAPOL_PROTOCOL_VERSION_2004;
get_nonce = eapol_get_nonce;
tx_packet = eapol_write;
return true;