diff options
author | Francis Dupont <fdupont@isc.org> | 2021-03-13 17:48:41 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2021-03-23 14:16:54 +0100 |
commit | b9a6f6c1b5ce1d9ae1cf0b4ed1f1e716fe05319d (patch) | |
tree | c05fe2d169f69db0bb0dd67b5ef0a3d47af42c6f /m4macros/ax_crypto.m4 | |
parent | [#1748] Added method namespace (diff) | |
download | kea-b9a6f6c1b5ce1d9ae1cf0b4ed1f1e716fe05319d.tar.xz kea-b9a6f6c1b5ce1d9ae1cf0b4ed1f1e716fe05319d.zip |
[#1748] More flexible version
Diffstat (limited to 'm4macros/ax_crypto.m4')
-rw-r--r-- | m4macros/ax_crypto.m4 | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/m4macros/ax_crypto.m4 b/m4macros/ax_crypto.m4 index bb70e6db3d..2914873331 100644 --- a/m4macros/ax_crypto.m4 +++ b/m4macros/ax_crypto.m4 @@ -368,7 +368,32 @@ EOF [AC_MSG_RESULT(yes) AC_DEFINE([HAVE_GENERIC_TLS_METHOD], [1], [Define to 1 if boost::asio::ssl::context::tls is available])], - [AC_MSG_RESULT(no)]) + [AC_MSG_RESULT(no) + AC_MSG_CHECKING([Verifying TLS 1.2 fallback]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>], + [auto ctx(boost::asio::ssl::context::tlsv12);])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_TLS_1_2_METHOD], [1], + [Define to 1 if boost::asio::ssl::context::tlsv12 is available])], + [AC_MSG_RESULT(no) + AC_MSG_WARN([The boost version is very old: TLS support can use insecure features])])]) + dnl Check if the stream_truncated (SSL short read) error is available + AC_MSG_CHECKING([stream_truncated (SSL short read) error]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>], + [const int ec = + boost::asio::ssl::error::stream_truncated;])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_STREAM_TRUNCATED_ERROR], [1], + [Define to 1 if boost::asio::ssl::error::stream_truncated is available])], + [AC_MSG_RESULT(no) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([#include <boost/asio/ssl.hpp>], + [const int ec = + ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ);])], + [], + [AC_MSG_ERROR([Can not find a definition for stream_truncated (SSL short read) error])])]) LIBS=${LIBS_SAVED} CPPFLAGS=${CPPFLAGS_SAVED} fi |