]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #788 for nettle 3.0: Failed to build with Nettle >= 3.0 and
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 5 Jul 2016 14:00:33 +0000 (14:00 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 5 Jul 2016 14:00:33 +0000 (14:00 +0000)
  --with-libunbound-only --with-nettle.

git-svn-id: file:///svn/unbound/trunk@3810 be551aaa-1e26-0410-a405-d3ace91eadb9

config.h.in
configure
configure.ac
doc/Changelog
validator/val_secalgo.c

index 354eca6e7d75bfefbcf1b9c3f1831550e634cc9d..c6118888e79f5731106f785271b67a006750babb 100644 (file)
 /* Use libnettle for crypto */
 #undef HAVE_NETTLE
 
+/* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
+#undef HAVE_NETTLE_DSA_COMPAT_H
+
 /* Use libnss for crypto */
 #undef HAVE_NSS
 
index 807e28c981b829ec1aa44463345434adca9c5442..9e83fdaee1bf7c6e9020f0dda9564a67eaa4374e 100755 (executable)
--- 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"
index b0ad763c9786524e2b9c42f291345d595bb1fca6..ada4d259ca2e4a567fe8141984e71cb2233c03cc 100644 (file)
@@ -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"
index 1b83c708a544a35784bc611e42fd72ebab7599ac..2c140b7235c337ea6cc5531ee5337d5f4e812c85 100644 (file)
@@ -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
index 43d580a884fe94e6a2ebe4f8cfb459066d70790a..bd5aa90db3a7e6c959616880e73a9f70ef19d0c0 100644 (file)
@@ -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"