diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-04 16:35:58 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-02-04 16:37:37 +0000 |
commit | ff62d93b0ed2051a2ba5c9cd9c12dd80c2890765 (patch) | |
tree | addc18a41900c3ca04cae760b10618e78c4918f1 /src/main.c | |
parent | d07102a78273a786b2d35d154173f2c4aff0cb27 (diff) | |
download | rspamd-ff62d93b0ed2051a2ba5c9cd9c12dd80c2890765.tar.gz rspamd-ff62d93b0ed2051a2ba5c9cd9c12dd80c2890765.zip |
Use libottery for secure random numbers.
Libottery itself is hosted here:
https://github.com/nmathewson/libottery
This import is a rough adoptation of libottery to use it for secure
random numbers in rspamd when needed (and in DNS resolver specifically).
This import makes the internal chacha20 code useless, hence it is
removed now.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 1cb641cda..ae4d5d409 100644 --- a/src/main.c +++ b/src/main.c @@ -34,6 +34,7 @@ #include "cfg_xml.h" #include "symbols_cache.h" #include "lua/lua_common.h" +#include "ottery.h" #ifdef HAVE_OPENSSL #include <openssl/rand.h> #include <openssl/err.h> @@ -1055,7 +1056,7 @@ main (gint argc, gchar **argv, gchar **env) OpenSSL_add_all_ciphers (); #endif - rspamd_prng_seed (); + g_random_set_seed (ottery_rand_uint32 ()); /* First set logger to console logger */ rspamd_main->cfg->log_type = RSPAMD_LOG_CONSOLE; |