diff options
author | Michael Brown | 2012-03-13 05:40:19 +0100 |
---|---|---|
committer | Michael Brown | 2012-03-13 16:58:04 +0100 |
commit | 554627c960def1adbf909e40126aefc0eed49529 (patch) | |
tree | 7d6d3175a2a9327d8832ebbb3905a29d18f7ea93 /src/net/80211 | |
parent | [forcedeth] Use standard random() function (diff) | |
download | ipxe-554627c960def1adbf909e40126aefc0eed49529.tar.gz ipxe-554627c960def1adbf909e40126aefc0eed49529.tar.xz ipxe-554627c960def1adbf909e40126aefc0eed49529.zip |
[802.11] Use rbg_generate() for secure random numbers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/80211')
-rw-r--r-- | src/net/80211/wpa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/80211/wpa.c b/src/net/80211/wpa.c index 90929ea3..45def8c1 100644 --- a/src/net/80211/wpa.c +++ b/src/net/80211/wpa.c @@ -29,6 +29,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/hmac.h> #include <ipxe/list.h> #include <ipxe/ethernet.h> +#include <ipxe/rbg.h> #include <stdlib.h> #include <string.h> #include <errno.h> @@ -515,7 +516,8 @@ static int wpa_handle_1_of_4 ( struct wpa_common_ctx *ctx, ctx->state = WPA_WORKING; memcpy ( ctx->Anonce, pkt->nonce, sizeof ( ctx->Anonce ) ); if ( ! ctx->have_Snonce ) { - get_random_bytes ( ctx->Snonce, sizeof ( ctx->Snonce ) ); + rbg_generate ( NULL, 0, 0, ctx->Snonce, + sizeof ( ctx->Snonce ) ); ctx->have_Snonce = 1; } |