summaryrefslogtreecommitdiff
path: root/lib/configure.ac
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2012-04-23 14:44:49 +0200
committerLinus Nordberg <linus@nordu.net>2012-04-23 14:44:49 +0200
commitdcce5a04612c307453519d72f28caceb73fdab2a (patch)
treebb872e0fa9fe87556558b1dbfaf528fb10bc485b /lib/configure.ac
parent4d61fddb4f7e895b8814e7d18e0276498dca9bdb (diff)
Conditionally compile TLS-PSK code (--enable-tls-psk).
Also, allow for PSK-only configuration, i.e. don't barf on missing cert stuff.
Diffstat (limited to 'lib/configure.ac')
-rw-r--r--lib/configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/configure.ac b/lib/configure.ac
index 9c24310..3339352 100644
--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -21,6 +21,7 @@ AC_CHECK_LIB([freeradius-radius], [rad_alloc],,
AC_MSG_ERROR([required library libfreeradius-radius not found]))
# Enable-knobs.
+## Enable TLS (RadSec).
AH_TEMPLATE([RS_ENABLE_TLS], [TLS (RadSec) enabled])
AH_TEMPLATE([RADPROT_TLS], []) dnl Legacy.
AC_ARG_ENABLE([tls], AS_HELP_STRING([--enable-tls], [enable TLS (RadSec)]),
@@ -29,6 +30,13 @@ AC_ARG_ENABLE([tls], AS_HELP_STRING([--enable-tls], [enable TLS (RadSec)]),
AC_DEFINE([RS_ENABLE_TLS])
AC_DEFINE([RADPROT_TLS])]) dnl Legacy.
AM_CONDITIONAL([RS_ENABLE_TLS], [test "${enable_tls+set}" = set])
+## Enable TLS-PSK (preshared keys).
+AH_TEMPLATE([RS_ENABLE_TLS_PSK], [TLS-PSK (TLS preshared keys) enabled])
+AC_ARG_ENABLE([tls-psk], AS_HELP_STRING([--enable-tls-psk], [enable TLS-PSK (TLS preshared keys)]),
+ [AC_CHECK_LIB([ssl], [SSL_set_psk_client_callback],,
+ AC_MSG_ERROR([required library openssl with SSL_set_psk_client_callback() not found]))
+ AC_DEFINE([RS_ENABLE_TLS_PSK])])
+AM_CONDITIONAL([RS_ENABLE_TLS_PSK], [test "${enable_tls_psk+set}" = set])
# Checks for header files.
AC_CHECK_HEADERS(