random: Read /dev/random in the background with eloop read socket
This makes it more likely to be able to fetch the 20 octet seed from /dev/random in cases where other programs may also be competing for this.
This commit is contained in:
parent
c4bb881743
commit
d47fa330b8
4 changed files with 91 additions and 2 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "includes.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "crypto/random.h"
|
||||
#include "eapol_supp/eapol_supp_sm.h"
|
||||
#include "eap_peer/eap.h"
|
||||
#include "eap_server/eap_methods.h"
|
||||
|
@ -2543,6 +2544,8 @@ struct wpa_global * wpa_supplicant_init(struct wpa_params *params)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
random_init();
|
||||
|
||||
global->ctrl_iface = wpa_supplicant_global_ctrl_iface_init(global);
|
||||
if (global->ctrl_iface == NULL) {
|
||||
wpa_supplicant_deinit(global);
|
||||
|
@ -2653,6 +2656,8 @@ void wpa_supplicant_deinit(struct wpa_global *global)
|
|||
}
|
||||
os_free(global->drv_priv);
|
||||
|
||||
random_deinit();
|
||||
|
||||
eloop_destroy();
|
||||
|
||||
if (global->params.pid_file) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue