From 83e82dba47aced4a93f9e431b4d8bca94c2f8517 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Thu, 11 Nov 2010 10:30:35 +0100 Subject: 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. --- lib/configure.ac | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'lib/configure.ac') diff --git a/lib/configure.ac b/lib/configure.ac index 5ae729f..2039233 100644 --- a/lib/configure.ac +++ b/lib/configure.ac @@ -11,6 +11,13 @@ AC_PROG_LIBTOOL # Checks for programs. AC_PROG_CC +# Enable-knobs. +AH_TEMPLATE([RS_ENABLE_TLS], [TLS (RadSec) enabled]) +AH_TEMPLATE([RADPROT_TLS], []) +AC_ARG_ENABLE([tls], AS_HELP_STRING([--enable-tls], [enable TLS (RadSec)]), + [AC_DEFINE([RS_ENABLE_TLS]) + AC_DEFINE([RADPROT_TLS])]) + # Checks for libraries. AC_CHECK_LIB([confuse], [cfg_init],, AC_MSG_ERROR([required library libconfuse not found])) @@ -18,9 +25,15 @@ AC_CHECK_LIB([event_core], [event_get_version],, AC_MSG_ERROR([required library libevent_core not found])) AC_CHECK_LIB([freeradius-radius], [rad_alloc],, AC_MSG_ERROR([required library libfreeradius-radius not found])) +dnl TODO: Only do this if --enable-tls or --enable-dtls. +#AC_CHECK_LIB([ssl], [SSL_new],, +# AC_MSG_ERROR([required library libssl not found])) +AC_CHECK_LIB([event_openssl], [bufferevent_openssl_socket_new],, + AC_MSG_ERROR([required library event_openssl not found])) # Checks for header files. -AC_CHECK_HEADERS([netdb.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h unistd.h]) +AC_CHECK_HEADERS( + [netdb.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T @@ -28,8 +41,6 @@ AC_TYPE_SSIZE_T AC_TYPE_UINT8_T # Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_REALLOC AC_CHECK_FUNCS([memset socket strdup strerror strrchr]) AC_CONFIG_FILES([Makefile -- cgit v1.1