summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-02-04 16:35:58 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-02-04 16:37:37 +0000
commitff62d93b0ed2051a2ba5c9cd9c12dd80c2890765 (patch)
treeaddc18a41900c3ca04cae760b10618e78c4918f1 /src/main.c
parentd07102a78273a786b2d35d154173f2c4aff0cb27 (diff)
downloadrspamd-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.c3
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;