aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/random
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/random')
-rw-r--r--src/libstrongswan/plugins/random/random_plugin.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/random/random_plugin.c b/src/libstrongswan/plugins/random/random_plugin.c
index 418eeae28..cef20047a 100644
--- a/src/libstrongswan/plugins/random/random_plugin.c
+++ b/src/libstrongswan/plugins/random/random_plugin.c
@@ -119,6 +119,7 @@ METHOD(plugin_t, destroy, void,
plugin_t *random_plugin_create()
{
private_random_plugin_t *this;
+ char *urandom_file, *random_file;
INIT(this,
.public = {
@@ -130,8 +131,12 @@ plugin_t *random_plugin_create()
},
);
- if (!open_dev(DEV_URANDOM, &dev_urandom) ||
- !open_dev(DEV_RANDOM, &dev_random))
+ urandom_file = lib->settings->get_str(lib->settings,
+ "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);
return NULL;