mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-16 00:00:37 -04:00
Add strongswan.conf runtime options for /dev/[u]random files
Fixes #221.
This commit is contained in:
parent
98521f0821
commit
7b68cd9212
@ -119,6 +119,7 @@ METHOD(plugin_t, destroy, void,
|
|||||||
plugin_t *random_plugin_create()
|
plugin_t *random_plugin_create()
|
||||||
{
|
{
|
||||||
private_random_plugin_t *this;
|
private_random_plugin_t *this;
|
||||||
|
char *urandom_file, *random_file;
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
@ -130,8 +131,12 @@ plugin_t *random_plugin_create()
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!open_dev(DEV_URANDOM, &dev_urandom) ||
|
urandom_file = lib->settings->get_str(lib->settings,
|
||||||
!open_dev(DEV_RANDOM, &dev_random))
|
"libstrongswan.plugins.random.urandom", DEV_URANDOM);
|
||||||
|
random_file = lib->settings->get_str(lib->settings,
|
||||||
|
"libstrongswan.plugins.random.random", DEV_RANDOM);
|
||||||
|
if (!open_dev(urandom_file, &dev_urandom) ||
|
||||||
|
!open_dev(random_file, &dev_random))
|
||||||
{
|
{
|
||||||
destroy(this);
|
destroy(this);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user