summaryrefslogtreecommitdiffstats
path: root/m4macros/ax_crypto.m4
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2021-04-20 17:03:51 +0200
committerTomek Mrugalski <tomek@isc.org>2021-05-05 12:12:41 +0200
commitbaa19fbf7a61b0bcefd7552cc0497c6c04c3b25a (patch)
tree12a8869fd5a2a331125ed30c8f56aa5da6749891 /m4macros/ax_crypto.m4
parentFix the PostgreSQL initial setup issues on FreeBSD (diff)
downloadkea-baa19fbf7a61b0bcefd7552cc0497c6c04c3b25a.tar.xz
kea-baa19fbf7a61b0bcefd7552cc0497c6c04c3b25a.zip
[#1665] Ported TLS Botan boost support
Diffstat (limited to 'm4macros/ax_crypto.m4')
-rw-r--r--m4macros/ax_crypto.m425
1 files changed, 24 insertions, 1 deletions
diff --git a/m4macros/ax_crypto.m4 b/m4macros/ax_crypto.m4
index dcc2c594bb..a8ac857b76 100644
--- a/m4macros/ax_crypto.m4
+++ b/m4macros/ax_crypto.m4
@@ -377,7 +377,28 @@ AC_SUBST(DISTCHECK_CRYPTO_CONFIGURE_FLAG)
AC_DEFUN([AX_TLS], [
if test "x${CRYPTO_NAME}" = "xBotan"
then
- AC_MSG_WARN([Botan TLS support is not yet done])
+ dnl Check Botan boost ASIO TLS
+ CPPFLAGS_SAVED=$CPPFLAGS
+ CPPFLAGS="$CRYPTO_INCLUDES $CPPFLAGS $BOOST_INCLUDES"
+ BOTAN_BOOST=""
+ AC_CHECK_HEADERS([botan/asio_stream.h],
+ [BOTAN_BOOST="maybe"
+ AC_MSG_CHECKING([Botan boost TLS support])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <botan/asio_stream.h>],
+ [#ifndef BOTAN_TLS_SERVER_H_
+ #error botan/tls_server.h is not included by botan/asio_stream.h])],
+ [AC_MSG_RESULT(yes)
+ BOTAN_BOOST="yes"
+ AC_DEFINE([WITH_BOTAN_BOOST], [1],
+ [Define to 1 if Botan boost TLS is available])],
+ [AC_MSG_RESULT(no)
+ BOTAN_BOOST="no"
+ AC_MSG_WARN([Botan is configured with boost support but is too old: only Botan >= 2.14.0 can be used for TLS])])],
+ [BOTAN_BOOST="no"
+ AC_MSG_RESULT([Botan was not configured with boost support.])
+ AC_MSG_WARN([Botan cannot be used for TLS support.])])
+ CPPFLAGS=${CPPFLAGS_SAVED}
fi
if test "x${CRYPTO_NAME}" = "xOpenSSL"
then
@@ -422,5 +443,7 @@ then
[AC_MSG_ERROR([Can not find a definition for stream_truncated (SSL short read) error: sorry, your boost library is too old])])])
CPPFLAGS=${CPPFLAGS_SAVED}
fi
+AM_CONDITIONAL(HAVE_BOTAN_BOOST,
+ test "$CRYPTO_NAME" = "Botan" && test "$BOTAN_BOOST" = "yes")
])
# End of AX_TLS