Add PRNG improvements to CHANGES.
[radsecproxy.git] / lib / radsec.c
index d14ad50..83ce6c5 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright 2010, 2011 NORDUnet A/S. All rights reserved.
-   See LICENSE for licensing information.  */
+/* Copyright 2010-2013 NORDUnet A/S. All rights reserved.
+   See LICENSE for licensing information. */
 
 #if defined HAVE_CONFIG_H
 #include <config.h>
 #include <radsec/radsec-impl.h>
 #include "err.h"
 #include "debug.h"
-#include "rsp_debug.h"
+#include "radsecproxy/debug.h"
 #if defined (RS_ENABLE_TLS)
+#include "tls.h"
 #include <regex.h>
-#include "rsp_list.h"
-#include "../radsecproxy.h"
+#include "radsecproxy/list.h"
+#include "radsecproxy/radsecproxy.h"
 #endif
 
 /* Public functions.  */
@@ -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)