From: Wouter Wijngaards Date: Wed, 30 Jan 2013 13:15:03 +0000 (+0000) Subject: - includes and have_ssl fixes for nss. X-Git-Tag: release-1.4.20rc1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffab065d1e6d73d2e64c9c9ba26cb238a6ebd361;p=thirdparty%2Funbound.git - includes and have_ssl fixes for nss. git-svn-id: file:///svn/unbound/trunk@2830 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure b/configure index 4bddb6831..49820e4c8 100755 --- a/configure +++ b/configure @@ -16009,8 +16009,8 @@ if test "${with_nss+set}" = set; then : $as_echo "#define HAVE_NSS 1" >>confdefs.h - if test "$withval" != "/usr" -a "$withval" != "" -a "$withval" != "yes"; then - CPPFLAGS="$CPPFLAGS -I$withval/include" + if test "$withval" != "" -a "$withval" != "yes"; then + CPPFLAGS="$CPPFLAGS -I$withval/include/nss3" LDFLAGS="$LDFLAGS -L$withval/lib" if test "x$enable_rpath" = xyes; then @@ -16021,6 +16021,7 @@ $as_echo "#define HAVE_NSS 1" >>confdefs.h CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS" else + CPPFLAGS="$CPPFLAGS -I/usr/include/nss3" CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS" fi LIBS="$LIBS -lnss3 -lnspr4" diff --git a/configure.ac b/configure.ac index b24c7d1d9..b07c5cb42 100644 --- a/configure.ac +++ b/configure.ac @@ -525,12 +525,13 @@ AC_ARG_WITH([nss], AC_HELP_STRING([--with-nss=path], [ USE_NSS="yes" AC_DEFINE(HAVE_NSS, 1, [Use libnss for crypto]) - if test "$withval" != "/usr" -a "$withval" != "" -a "$withval" != "yes"; then - CPPFLAGS="$CPPFLAGS -I$withval/include" + if test "$withval" != "" -a "$withval" != "yes"; then + CPPFLAGS="$CPPFLAGS -I$withval/include/nss3" LDFLAGS="$LDFLAGS -L$withval/lib" ACX_RUNTIME_PATH_ADD([$withval/lib]) CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS" else + CPPFLAGS="$CPPFLAGS -I/usr/include/nss3" CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS" fi LIBS="$LIBS -lnss3 -lnspr4" diff --git a/daemon/daemon.c b/daemon/daemon.c index 36aab9b18..61258174f 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -57,7 +57,8 @@ #endif #ifdef HAVE_NSS -#include +/* nss3 */ +#include "nss.h" #endif #include diff --git a/daemon/unbound.c b/daemon/unbound.c index 377396fc4..cd08c9c3f 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -88,7 +88,8 @@ #endif #ifdef HAVE_NSS -# include +/* nss3 */ +# include "nss.h" #endif /** global debug value to keep track of heap memory allocation */ diff --git a/doc/Changelog b/doc/Changelog index 13c17ed2b..3ffa4f7a7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +30 January 2013: Wouter + - includes and have_ssl fixes for nss. + 29 January 2013: Wouter - printout name of zone with duplicate fwd and hint errors. diff --git a/libunbound/libworker.c b/libunbound/libworker.c index e3da24dd8..e547f4dbf 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -44,7 +44,9 @@ #include "config.h" #include #include +#ifdef HAVE_SSL #include +#endif #include "libunbound/libworker.h" #include "libunbound/context.h" #include "libunbound/unbound.h" @@ -88,7 +90,9 @@ libworker_delete(struct libworker* w) ub_randfree(w->env->rnd); free(w->env); } +#ifdef HAVE_SSL SSL_CTX_free(w->sslctx); +#endif outside_network_delete(w->back); comm_base_delete(w->base); free(w); diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index ed52a551f..715aa4a65 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -62,7 +62,8 @@ #include "libunbound/unbound.h" #include #ifdef HAVE_NSS -#include +/* nss3 */ +#include "nss.h" #endif /** verbosity for unbound-host app */ diff --git a/testcode/unitmain.c b/testcode/unitmain.c index 6dcb95eb9..122f09b86 100644 --- a/testcode/unitmain.c +++ b/testcode/unitmain.c @@ -57,7 +57,8 @@ #endif #ifdef HAVE_NSS -#include "nss3/nss.h" +/* nss3 */ +#include "nss.h" #endif #include diff --git a/util/random.c b/util/random.c index 5b61aef7f..5d71fcfa4 100644 --- a/util/random.c +++ b/util/random.c @@ -65,9 +65,11 @@ #include #include #elif defined(HAVE_NSS) -#include -#include -#include +/* nspr4 */ +#include "prerror.h" +/* nss3 */ +#include "secport.h" +#include "pk11pub.h" #endif /** diff --git a/validator/val_nsec3.c b/validator/val_nsec3.c index 2a2cfcf9b..4b48e7bee 100644 --- a/validator/val_nsec3.c +++ b/validator/val_nsec3.c @@ -46,7 +46,8 @@ #include "openssl/ssl.h" #endif #ifdef HAVE_NSS -#include +/* nss3 */ +#include "sechash.h" #endif #include "validator/val_nsec3.h" #include "validator/validator.h" diff --git a/validator/val_secalgo.c b/validator/val_secalgo.c index 676399733..5cca578b1 100644 --- a/validator/val_secalgo.c +++ b/validator/val_secalgo.c @@ -553,12 +553,14 @@ verify_canonrrset(ldns_buffer* buf, int algo, unsigned char* sigblock, /**************************************************/ #elif defined(HAVE_NSS) /* libnss implementation */ -#include -#include -#include -#include -#include -#include +/* nss3 */ +#include "sechash.h" +#include "pk11pub.h" +#include "keyhi.h" +#include "secerr.h" +#include "cryptohi.h" +/* nspr4 */ +#include "prerror.h" size_t ds_digest_size_supported(int algo)