From 46f954490d85e029abd4393a5bd481734256f84f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 10 Mar 2020 14:02:08 +0100 Subject: [PATCH] configure: improve nettle and gnutls check Before enabling NTS, check for more gnutls functions (some added in 3.6.3) to avoid build failures with older gnutls versions. Also, make sure that nettle supports the new AES interface (added in 3.0). --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a4c7b88..0417deb 100755 --- a/configure +++ b/configure @@ -971,8 +971,12 @@ if [ $feat_ntp = "1" ] && [ $feat_nts = "1" ] && [ $try_gnutls = "1" ] && \ test_cflags="`pkg_config --cflags gnutls`" test_link="`pkg_config --libs gnutls`" if test_code 'gnutls' 'gnutls/gnutls.h' \ - "$test_cflags" "$test_link" \ - 'gnutls_init(NULL, 0);' + "$test_cflags" "$test_link" ' + return gnutls_init(NULL, 0) + + gnutls_priority_init2(NULL, "", NULL, GNUTLS_PRIORITY_INIT_DEF_APPEND) + + gnutls_prf_rfc5705(NULL, 0, "", 0, "", 16, NULL);' && + test_code 'AES128 in nettle' 'nettle/aes.h' '' "$LIBS" \ + 'aes128_set_encrypt_key(NULL, NULL);' then EXTRA_OBJECTS="$EXTRA_OBJECTS nts_ke_client.o nts_ke_server.o nts_ke_session.o" EXTRA_OBJECTS="$EXTRA_OBJECTS nts_ntp_auth.o nts_ntp_client.o nts_ntp_server.o"