Commit e0c60792 authored by Niels Möller's avatar Niels Möller

Adapted libspki to always use the installed nettle library,

don't look for it in the build tree.
parent 01a4a54a
2012-07-13 Niels Möller <nisse@lysator.liu.se> 2012-07-13 Niels Möller <nisse@lysator.liu.se>
Always use the installed nettle library, don't look for it in the
build tree.
* configure.ac: Use a regular AC_CHECK_LIB to check for nettle.
Deleted check for nettle_buildir.
* certificate.h, certificate.c: Use angles, <>, when including
nettle header files.
* parse.h, parse-transport.c, parse.c: Likewise.
* tag.h, tag.c, verify,c: Likewise.
* testsuite/testutils.h: Likewise.
* Makefile.in (PRE_CPPFLAGS): Delete reference to nettle_buildir.
(PRE_LDFLAGS): Deleted.
* testsuite/Makefile.in (PRE_CPPFLAGS): Delete reference to
nettle_buildir.
(PRE_LDFLAGS): Likewise.
(check): Don't set LD_LIBRARY_PATH (used to point at
nettle_buildir/.lib).
* tools/Makefile.in (PRE_CPPFLAGS): Delete reference to nettle_buildir.
(PRE_LDFLAGS): Likewise.
* testsuite/check-signature-test: Use installed sexp-conv.
* testsuite/delegate-test: Likewise.
* testsuite/make-signature-test: Likewise.
* testsuite/reduce-test: Likewise.
* Fixed copyright headers on many files, used to say "The nettle * Fixed copyright headers on many files, used to say "The nettle
library is free software". Now refers to the "libspki library" library is free software". Now refers to the "libspki library"
instead. instead.
......
...@@ -14,8 +14,7 @@ MKDIR_P = @MKDIR_P@ ...@@ -14,8 +14,7 @@ MKDIR_P = @MKDIR_P@
SUBDIRS = tools testsuite SUBDIRS = tools testsuite
PRE_CPPFLAGS = -I. -I$(srcdir) -Inettle_builddir PRE_CPPFLAGS = -I. -I$(srcdir)
PRE_LDFLAGS = -Lnettle_builddir
include config.make include config.make
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "nettle/md5.h" #include <nettle/md5.h>
#include "nettle/sha.h" #include <nettle/sha.h>
#include "nettle/sexp.h" #include <nettle/sexp.h>
#include "certificate.h" #include "certificate.h"
#include "parse.h" #include "parse.h"
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
#define LIBSPKI_CERTIFICATE_H_INCLUDED #define LIBSPKI_CERTIFICATE_H_INCLUDED
#include "nettle/md5.h" #include <nettle/md5.h>
#include "nettle/sha.h" #include <nettle/sha.h>
#include "nettle/realloc.h" #include <nettle/realloc.h>
#include "nettle/buffer.h" #include <nettle/buffer.h>
/* This should be the only file ever including spki-types.h /* This should be the only file ever including spki-types.h
* directly. */ * directly. */
......
...@@ -73,10 +73,11 @@ AC_CHECK_LIB(gmp, __gmpz_getlimbn,, ...@@ -73,10 +73,11 @@ AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
# Add -R flags needed to run programs linked with gmp # Add -R flags needed to run programs linked with gmp
LSH_RPATH_FIX LSH_RPATH_FIX
if test -d nettle_buildir; then AC_CHECK_LIB(nettle, nettle_sha1_digest,,
CPPFLAGS="$CCPFLAGS -Inettle_builddir" [AC_MSG_ERROR(
LD_FLAGS="$LDFLAGS -Lnettle_builddir" [Nettle library not found. See http://www.lysator.liu.se/~nisse/nettle/.])])
fi
LSH_RPATH_FIX
# Set these flags *last*, or else the test programs won't compile # Set these flags *last*, or else the test programs won't compile
if test x$GCC = xyes ; then if test x$GCC = xyes ; then
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "parse.h" #include "parse.h"
#include "nettle/sexp.h" #include <nettle/sexp.h>
enum spki_type enum spki_type
spki_transport_iterator_first(struct spki_iterator *i, spki_transport_iterator_first(struct spki_iterator *i,
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include "nettle/sexp.h" #include <nettle/sexp.h>
#include "parse.h" #include "parse.h"
#include "tag.h" #include "tag.h"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#ifndef LIBSPKI_PARSE_H_INCLUDED #ifndef LIBSPKI_PARSE_H_INCLUDED
#define LIBSPKI_PARSE_H_INCLUDED #define LIBSPKI_PARSE_H_INCLUDED
#include "nettle/sexp.h" #include <nettle/sexp.h>
#include "certificate.h" #include "certificate.h"
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "nettle/buffer.h" #include <nettle/buffer.h>
#include "nettle/sexp.h" #include <nettle/sexp.h>
#include "tag.h" #include "tag.h"
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
struct sexp_iterator; struct sexp_iterator;
#include "nettle/realloc.h" #include <nettle/realloc.h>
#include "nettle/buffer.h" #include <nettle/buffer.h>
struct spki_tag; struct spki_tag;
......
...@@ -7,8 +7,8 @@ top_srcdir = @top_srcdir@ ...@@ -7,8 +7,8 @@ top_srcdir = @top_srcdir@
include ../config.make include ../config.make
PRE_CPPFLAGS = -I.. -I$(top_srcdir) -I../nettle_builddir PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L.. -L../nettle_builddir PRE_LDFLAGS = -L..
TS_SOURCES = principal-test.c date-test.c tag-test.c read-acl-test.c \ TS_SOURCES = principal-test.c date-test.c tag-test.c read-acl-test.c \
lookup-acl-test.c read-cert-test.c cdsa-reduce-test.c lookup-acl-test.c read-cert-test.c cdsa-reduce-test.c
...@@ -52,8 +52,7 @@ test-rules: ...@@ -52,8 +52,7 @@ test-rules:
include $(srcdir)/.test-rules.make include $(srcdir)/.test-rules.make
check: $(TS_ALL) check: $(TS_ALL)
LD_LIBRARY_PATH=../nettle_builddir/.lib srcdir=$(srcdir) \ srcdir=$(srcdir) $(srcdir)/run-tests $(TS_ALL)
$(srcdir)/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status testsuite/$@ cd .. && $(SHELL) ./config.status testsuite/$@
......
#! /bin/sh #! /bin/sh
conv () { conv () {
echo "$1" | ../../nettle/tools/sexp-conv -s transport | tee test.in echo "$1" | sexp-conv -s transport | tee test.in
} }
die () { die () {
......
#! /bin/sh #! /bin/sh
conv () { conv () {
../../nettle/tools/sexp-conv -s transport | tee test.in sexp-conv -s transport | tee test.in
} }
die () { die () {
...@@ -12,7 +12,7 @@ die () { ...@@ -12,7 +12,7 @@ die () {
check_sexp () { check_sexp () {
file="$1" file="$1"
shift shift
../../nettle/tools/sexp-conv -s canonical > test.canonical || die "sexp-conv failed" sexp-conv -s canonical > test.canonical || die "sexp-conv failed"
cmp "$file" test.canonical || die "$@" cmp "$file" test.canonical || die "$@"
} }
......
#! /bin/sh #! /bin/sh
conv () { conv () {
echo "$1" | ../../nettle/tools/sexp-conv -s transport | tee test.in echo "$1" sexp-conv -s transport | tee test.in
} }
die () { die () {
...@@ -10,7 +10,7 @@ die () { ...@@ -10,7 +10,7 @@ die () {
} }
echo foo | ../tools/spki-make-signature "$srcdir/key-1" \ echo foo | ../tools/spki-make-signature "$srcdir/key-1" \
| ../../nettle/tools/sexp-conv -s transport > test.in | sexp-conv -s transport > test.in
echo foo | ../tools/spki-check-signature "`cat test.in`" \ echo foo | ../tools/spki-check-signature "`cat test.in`" \
|| die "Valid signature failed" || die "Valid signature failed"
......
#! /bin/sh #! /bin/sh
# Test case from Oscar Cnovas Reverte # Test case from Oscar Cánovas Reverte
conv () { conv () {
../../nettle/tools/sexp-conv -s transport sexp-conv -s transport
} }
die () { die () {
...@@ -14,7 +14,7 @@ die () { ...@@ -14,7 +14,7 @@ die () {
check_sexp () { check_sexp () {
file="$1" file="$1"
shift shift
../../nettle/tools/sexp-conv -s canonical > test.canonical || die "sexp-conv failed" sexp-conv -s canonical > test.canonical || die "sexp-conv failed"
cmp "$file" test.canonical || die "$@" cmp "$file" test.canonical || die "$@"
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "parse.h" #include "parse.h"
#include "tag.h" #include "tag.h"
#include "nettle/sexp.h" #include <nettle/sexp.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -7,8 +7,8 @@ top_srcdir = @top_srcdir@ ...@@ -7,8 +7,8 @@ top_srcdir = @top_srcdir@
include ../config.make include ../config.make
PRE_CPPFLAGS = -I.. -I$(top_srcdir) -I../nettle_builddir PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L.. -L../nettle_builddir PRE_LDFLAGS = -L..
PROGRAM_LIBS = -lspki -lhogweed -lnettle $(LIBS) PROGRAM_LIBS = -lspki -lhogweed -lnettle $(LIBS)
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
# include "config.h" # include "config.h"
#endif #endif
#include "nettle/bignum.h" #include <nettle/bignum.h>
#include "nettle/dsa.h" #include <nettle/dsa.h>
#include "nettle/rsa.h" #include <nettle/rsa.h>
#include "certificate.h" #include "certificate.h"
#include "parse.h" #include "parse.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment