From d78883a06844768888c23e8df30f32968f112175 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 20 Mar 2015 12:31:14 -0500 Subject: [PATCH] eapol: Add default nonce generator --- src/eapol.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/eapol.c b/src/eapol.c index f2ace9b7..9c0a5c9c 100644 --- a/src/eapol.c +++ b/src/eapol.c @@ -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;