From: Martin Willi Date: Mon, 15 Jun 2009 16:06:16 +0000 (+0200) Subject: added a gcrypt.quick_random option to generate weak testing keys faster X-Git-Tag: 4.3.2~56 X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=commitdiff_plain;h=810ce1f336fffd3ca14344060cfd1ba800ca8940;ds=sidebyside added a gcrypt.quick_random option to generate weak testing keys faster --- diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c index 18e26e7..1d6d74a 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);