From: Wouter Wijngaards Date: Tue, 5 Jul 2016 14:00:33 +0000 (+0000) Subject: - Fix #788 for nettle 3.0: Failed to build with Nettle >= 3.0 and X-Git-Tag: release-1.5.10~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaa6e239f7af6c3cc99212fb03027148a28fdde5;p=thirdparty%2Funbound.git - Fix #788 for nettle 3.0: Failed to build with Nettle >= 3.0 and --with-libunbound-only --with-nettle. git-svn-id: file:///svn/unbound/trunk@3810 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/config.h.in b/config.h.in index 354eca6e7..c6118888e 100644 --- a/config.h.in +++ b/config.h.in @@ -257,6 +257,9 @@ /* Use libnettle for crypto */ #undef HAVE_NETTLE +/* Define to 1 if you have the header file. */ +#undef HAVE_NETTLE_DSA_COMPAT_H + /* Use libnss for crypto */ #undef HAVE_NSS diff --git a/configure b/configure index 807e28c98..9e83fdaee 100755 --- a/configure +++ b/configure @@ -17034,6 +17034,19 @@ if test "${with_nettle+set}" = set; then : $as_echo "#define HAVE_NETTLE 1" >>confdefs.h + for ac_header in nettle/dsa-compat.h +do : + ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default +" +if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETTLE_DSA_COMPAT_H 1 +_ACEOF + +fi + +done + if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" diff --git a/configure.ac b/configure.ac index b0ad763c9..ada4d259c 100644 --- a/configure.ac +++ b/configure.ac @@ -630,6 +630,7 @@ AC_ARG_WITH([nettle], AC_HELP_STRING([--with-nettle=path], [ USE_NETTLE="yes" AC_DEFINE(HAVE_NETTLE, 1, [Use libnettle for crypto]) + AC_CHECK_HEADERS([nettle/dsa-compat.h],,, [AC_INCLUDES_DEFAULT]) if test "$withval" != "" -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" LDFLAGS="$LDFLAGS -L$withval/lib" diff --git a/doc/Changelog b/doc/Changelog index 1b83c708a..2c140b723 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,8 @@ - Fix dynamic link of anchor-update.exe on windows. - Fix detect of mingw for MXE package build. - Fixes for 64bit windows compile. + - Fix #788 for nettle 3.0: Failed to build with Nettle >= 3.0 and + --with-libunbound-only --with-nettle. 4 July 2016: Wouter - For #787: prefer-ip6 option for unbound.conf prefers to send diff --git a/validator/val_secalgo.c b/validator/val_secalgo.c index 43d580a88..bd5aa90db 100644 --- a/validator/val_secalgo.c +++ b/validator/val_secalgo.c @@ -1198,6 +1198,9 @@ verify_canonrrset(sldns_buffer* buf, int algo, unsigned char* sigblock, #include "macros.h" #include "rsa.h" #include "dsa.h" +#ifdef HAVE_NETTLE_DSA_COMPAT_H +#include "dsa-compat.h" +#endif #include "asn1.h" #ifdef USE_ECDSA #include "ecdsa.h"