diff options
author | Martin Willi <martin@revosec.ch> | 2012-09-10 16:47:36 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-09-10 17:07:51 +0200 |
commit | 7b68cd92127a85835d2c0808c2b5981a98ab5350 (patch) | |
tree | ba9e2b60ee62249dd6723e1d29958698a4e58ad1 /src/libstrongswan/plugins | |
parent | 98521f08210f37340d644ae0785ffdfb6fb9fcbc (diff) | |
download | strongswan-7b68cd92127a85835d2c0808c2b5981a98ab5350.tar.bz2 strongswan-7b68cd92127a85835d2c0808c2b5981a98ab5350.tar.xz |
Add strongswan.conf runtime options for /dev/[u]random files
Fixes #221.
Diffstat (limited to 'src/libstrongswan/plugins')
-rw-r--r-- | src/libstrongswan/plugins/random/random_plugin.c | 9 |
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; |