unit-tests: test with /dev/urandom if random plugin is in use
authorMartin Willi <martin@revosec.ch>
Wed, 19 Jun 2013 13:32:19 +0000 (15:32 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 21 Jun 2013 08:53:22 +0000 (10:53 +0200)
src/libstrongswan/tests/test_runner.c

index b5b784a..556e513 100644 (file)
@@ -33,6 +33,12 @@ int main()
 
        library_init(NULL);
 
+       /* use non-blocking RNG to generate keys fast */
+       lib->settings->set_default_str(lib->settings,
+                       "libstrongswan.plugins.random.random",
+                       lib->settings->get_str(lib->settings,
+                               "libstrongswan.plugins.random.urandom", "/dev/urandom"));
+
        if (!lib->plugins->load(lib->plugins, NULL, PLUGINS))
        {
                library_deinit();