summaryrefslogtreecommitdiff
path: root/lib/radsec.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2010-11-11 10:30:35 +0100
committerLinus Nordberg <linus@nordu.net>2010-11-11 10:30:35 +0100
commit83e82dba47aced4a93f9e431b4d8bca94c2f8517 (patch)
tree7ff1779ea924d557b6ded9bd21c0cc8a65f062dd /lib/radsec.c
parentf9b25cad24ec4e3e89e818457beb29cbe08eed0c (diff)
Bringing up TLS connections working.
NOTE: Clean up of resources not yet sane. Expect resource leakages. NOTE: Most failure cases are not handled properly. With the wind at your back and the sun shining, it might work.
Diffstat (limited to 'lib/radsec.c')
-rw-r--r--lib/radsec.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/radsec.c b/lib/radsec.c
index b7ac9ba..40d14fc 100644
--- a/lib/radsec.c
+++ b/lib/radsec.c
@@ -1,5 +1,9 @@
/* See the file COPYING for licensing information. */
+#if defined HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
@@ -12,6 +16,12 @@
#include <event2/util.h>
#include <radsec/radsec.h>
#include <radsec/radsec-impl.h>
+#if defined RS_ENABLE_TLS
+#include <regex.h>
+#include "rsp_list.h"
+#include "../radsecproxy.h"
+#endif
+#include "rsp_debug.h"
int
rs_context_create(struct rs_context **ctx, const char *dict)
@@ -48,10 +58,14 @@ rs_context_create(struct rs_context **ctx, const char *dict)
}
free (buf1);
free (buf2);
+#if defined RS_ENABLE_TLS
+ ssl_init ();
+#endif
#if defined (DEBUG)
fr_log_fp = stderr;
fr_debug_flag = 1;
#endif
+ debug_init ("libradsec"); /* radsecproxy compat, FIXME: remove */
memset (h, 0, sizeof(struct rs_context));
fr_randinit (&h->fr_randctx, 0);