diff options
author | Florian Dold <florian@dold.me> | 2021-10-07 14:36:34 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-07 14:50:53 +0200 |
commit | ce961ab6f352bc26f244185e693dfc882151c3d0 (patch) | |
tree | ae264537817b686ad677816cb5010113cd5fa74d /configure.ac | |
parent | bfb15f6f8786c777b0c6e63a3bef9c671c8d34fa (diff) | |
download | anastasis-ce961ab6f352bc26f244185e693dfc882151c3d0.tar.gz anastasis-ce961ab6f352bc26f244185e693dfc882151c3d0.tar.bz2 anastasis-ce961ab6f352bc26f244185e693dfc882151c3d0.zip |
use libsodium cryptobox / chacha20poly1305
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 5463600..70778fb 100644 --- a/configure.ac +++ b/configure.ac @@ -160,7 +160,15 @@ AX_LIB_POSTGRESQL([9.3]) AS_IF([test "x$found_postgresql" = "xyes"],[postgres=true]) AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue) +libsodium=0 +# test for libsodium >=1.018 (introduction of +# crypto_scalarmult_ed25519_base_noclamp API) +AC_CHECK_HEADER([sodium.h], + [AC_CHECK_LIB([sodium], [crypto_core_ed25519_scalar_mul], + [libsodium=1])]) +AS_IF([test x$libsodium = x0], + [AC_MSG_ERROR([Anastasis requires libsodium >= 1.0.18.])]) # Check for Taler's libtalerutil @@ -180,6 +188,12 @@ AS_CASE([$with_exchange], CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" LDFLAGS="$LDFLAGS -L/usr/local/lib" +# Require minimum libgcrypt version +need_libgcrypt_version=1.6.1 +AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$need_libgcrypt_version"], + [minimum version of libgcrypt required]) +AM_PATH_LIBGCRYPT([$need_libgcrypt_version]) + AC_CHECK_HEADERS([taler/taler_util.h], [AC_CHECK_LIB([talerutil], [TALER_b2s], @@ -243,13 +257,6 @@ PKG_CHECK_MODULES([JANSSON], [jansson >= 2.3], *** You need libjansson to build this program. ***]])]) - -# Require minimum libgcrypt version -need_libgcrypt_version=1.6.1 -AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], ["$need_libgcrypt_version"], - [minimum version of libgcrypt required]) -AM_PATH_LIBGCRYPT([$need_libgcrypt_version]) - # logging extra_logging=0 AC_ARG_ENABLE([logging], |