diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-12-18 20:37:44 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-12-20 19:00:12 +0100 |
commit | 11570f6201548b957b70e8b93e954538f01d09c7 (patch) | |
tree | c2ee2c80df6862842292f11878ab184b3464b9d4 /lib/radsec.c | |
parent | da72e14ca91c1bdbee8bec0fcdd28054517cd200 (diff) |
Improve initialisation of OpenSSL PRNG.
Basic idea taken from Tor.
Diffstat (limited to 'lib/radsec.c')
-rw-r--r-- | lib/radsec.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/radsec.c b/lib/radsec.c index efd2dc3..83ce6c5 100644 --- a/lib/radsec.c +++ b/lib/radsec.c @@ -21,6 +21,7 @@ #include "debug.h" #include "radsecproxy/debug.h" #if defined (RS_ENABLE_TLS) +#include "tls.h" #include <regex.h> #include "radsecproxy/list.h" #include "radsecproxy/radsecproxy.h" @@ -32,14 +33,15 @@ rs_context_create (struct rs_context **ctx) { struct rs_context *h; +#if defined (RS_ENABLE_TLS) + if (tls_init ()) + return RSE_SSLERR; +#endif + h = calloc (1, sizeof(*h)); if (h == NULL) return RSE_NOMEM; -#if defined (RS_ENABLE_TLS) - ssl_init (); -#endif - debug_init ("libradsec"); /* radsecproxy compat, FIXME: remove */ if (ctx != NULL) |