2 |
|
* hostapd - PeerKey for Direct Link Setup (DLS) |
3 |
|
* Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi> |
4 |
|
* |
5 |
< |
* This program is free software; you can redistribute it and/or modify |
6 |
< |
* it under the terms of the GNU General Public License version 2 as |
7 |
< |
* published by the Free Software Foundation. |
8 |
< |
* |
9 |
< |
* Alternatively, this software may be distributed under the terms of BSD |
10 |
< |
* license. |
11 |
< |
* |
12 |
< |
* See README and COPYING for more details. |
5 |
> |
* This software may be distributed under the terms of the BSD license. |
6 |
> |
* See README for more details. |
7 |
|
*/ |
8 |
|
|
9 |
|
#include "utils/includes.h" |
12 |
|
#include "utils/eloop.h" |
13 |
|
#include "crypto/sha1.h" |
14 |
|
#include "crypto/sha256.h" |
15 |
+ |
#include "crypto/random.h" |
16 |
|
#include "wpa_auth.h" |
17 |
|
#include "wpa_auth_i.h" |
18 |
|
#include "wpa_auth_ie.h" |
289 |
|
return; |
290 |
|
} |
291 |
|
|
292 |
< |
if (os_get_random(smk, PMK_LEN)) { |
292 |
> |
if (random_get_bytes(smk, PMK_LEN)) { |
293 |
|
wpa_printf(MSG_DEBUG, "RSN: Failed to generate SMK"); |
294 |
|
return; |
295 |
|
} |