aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/gcrypt
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-06-15 18:06:16 +0200
committerMartin Willi <martin@strongswan.org>2009-06-15 18:06:16 +0200
commit810ce1f336fffd3ca14344060cfd1ba800ca8940 (patch)
tree10da1dc784c09bd8d085dcab37da0222307a2235 /src/libstrongswan/plugins/gcrypt
parentf1f968d5629e80944cc7158b4fe403c1a637efc3 (diff)
downloadstrongswan-810ce1f336fffd3ca14344060cfd1ba800ca8940.tar.bz2
strongswan-810ce1f336fffd3ca14344060cfd1ba800ca8940.tar.xz
added a gcrypt.quick_random option to generate weak testing keys faster
Diffstat (limited to 'src/libstrongswan/plugins/gcrypt')
-rw-r--r--src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
index 18e26e769..1d6d74a7b 100644
--- a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
+++ b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
@@ -130,6 +130,11 @@ plugin_t *plugin_create()
/* we currently do not use secure memory */
gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
+ if (lib->settings->get_bool(lib->settings,
+ "libstrongswan.plugins.gcrypt.quick_random", FALSE))
+ {
+ gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ }
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
this = malloc_thing(private_gcrypt_plugin_t);