From: Dmitry Eremin-Solenikov Date: Sun, 14 Jul 2019 09:17:18 +0000 (+0300) Subject: nettle/backport: fix xts-backport guarding check X-Git-Tag: gnutls_3_6_9~1^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5df63c6ffba10ecdb3660531ad67424eb14d8552;p=thirdparty%2Fgnutls.git nettle/backport: fix xts-backport guarding check Check for nettle_xts_encrypt_message() function rather than just xts_encrypt_message(). All functions in nettle are renamed to contain `nettle_` prefix. Signed-off-by: Dmitry Eremin-Solenikov --- diff --git a/configure.ac b/configure.ac index 9728f316ed..c388704bbb 100644 --- a/configure.ac +++ b/configure.ac @@ -573,7 +573,7 @@ LIBS=$save_LIBS # Check if nettle has XTS support save_LIBS=$LIBS LIBS="$LIBS $NETTLE_LIBS" -AC_CHECK_FUNCS(xts_encrypt_message) +AC_CHECK_FUNCS(nettle_xts_encrypt_message) LIBS=$save_LIBS # Check for Gosthash94 with CryptoPro S-box support diff --git a/lib/nettle/backport/xts.c b/lib/nettle/backport/xts.c index a7ef120aa0..d8c258f650 100644 --- a/lib/nettle/backport/xts.c +++ b/lib/nettle/backport/xts.c @@ -29,7 +29,7 @@ #include #endif -#ifndef HAVE_XTS_ENCRYPT_MESSAGE +#ifndef HAVE_NETTLE_XTS_ENCRYPT_MESSAGE #include "xts.h" #include @@ -270,4 +270,4 @@ xts_aes256_decrypt_message(struct xts_aes256_key *xts_key, tweak, length, dst, src); } -#endif /* HAVE_XTS_ENCRYPT_MESSAGE */ +#endif /* HAVE_NETTLE_XTS_ENCRYPT_MESSAGE */ diff --git a/lib/nettle/backport/xts.h b/lib/nettle/backport/xts.h index 238e31272a..8c52f9a092 100644 --- a/lib/nettle/backport/xts.h +++ b/lib/nettle/backport/xts.h @@ -23,7 +23,7 @@ #ifndef GNUTLS_LIB_NETTLE_BACKPORT_XTS_H #define GNUTLS_LIB_NETTLE_BACKPORT_XTS_H -#ifdef HAVE_XTS_ENCRYPT_MESSAGE +#ifdef HAVE_NETTLE_XTS_ENCRYPT_MESSAGE #include #else /* Nettle version is old, use a vendored version instead */ @@ -117,6 +117,6 @@ xts_aes256_decrypt_message(struct xts_aes256_key *xts_key, #endif /* NETTLE_XTS_H_INCLUDED */ -#endif /* HAVE_XTS_ENCRYPT_MESSAGE */ +#endif /* HAVE_NETTLE_XTS_ENCRYPT_MESSAGE */ #endif /* GNUTLS_LIB_NETTLE_BACKPORT_XTS_H */