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>
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
library is free software". Now refers to the "libspki library"
instead.
......
......@@ -14,8 +14,7 @@ MKDIR_P = @MKDIR_P@
SUBDIRS = tools testsuite
PRE_CPPFLAGS = -I. -I$(srcdir) -Inettle_builddir
PRE_LDFLAGS = -Lnettle_builddir
PRE_CPPFLAGS = -I. -I$(srcdir)
include config.make
......
......@@ -28,9 +28,9 @@
#include <stdlib.h>
#include <string.h>
#include "nettle/md5.h"
#include "nettle/sha.h"
#include "nettle/sexp.h"
#include <nettle/md5.h>
#include <nettle/sha.h>
#include <nettle/sexp.h>
#include "certificate.h"
#include "parse.h"
......
......@@ -24,10 +24,10 @@
#define LIBSPKI_CERTIFICATE_H_INCLUDED
#include "nettle/md5.h"
#include "nettle/sha.h"
#include "nettle/realloc.h"
#include "nettle/buffer.h"
#include <nettle/md5.h>
#include <nettle/sha.h>
#include <nettle/realloc.h>
#include <nettle/buffer.h>
/* This should be the only file ever including spki-types.h
* directly. */
......
......@@ -73,10 +73,11 @@ AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
# Add -R flags needed to run programs linked with gmp
LSH_RPATH_FIX
if test -d nettle_buildir; then
CPPFLAGS="$CCPFLAGS -Inettle_builddir"
LD_FLAGS="$LDFLAGS -Lnettle_builddir"
fi
AC_CHECK_LIB(nettle, nettle_sha1_digest,,
[AC_MSG_ERROR(
[Nettle library not found. See http://www.lysator.liu.se/~nisse/nettle/.])])
LSH_RPATH_FIX
# Set these flags *last*, or else the test programs won't compile
if test x$GCC = xyes ; then
......
......@@ -26,7 +26,7 @@
#include "parse.h"
#include "nettle/sexp.h"
#include <nettle/sexp.h>
enum spki_type
spki_transport_iterator_first(struct spki_iterator *i,
......
......@@ -27,7 +27,7 @@
#include <assert.h>
#include <string.h>
#include "nettle/sexp.h"
#include <nettle/sexp.h>
#include "parse.h"
#include "tag.h"
......
......@@ -23,7 +23,7 @@
#ifndef LIBSPKI_PARSE_H_INCLUDED
#define LIBSPKI_PARSE_H_INCLUDED
#include "nettle/sexp.h"
#include <nettle/sexp.h>
#include "certificate.h"
......
......@@ -30,8 +30,8 @@
#include <stdlib.h>
#include <string.h>
#include "nettle/buffer.h"
#include "nettle/sexp.h"
#include <nettle/buffer.h>
#include <nettle/sexp.h>
#include "tag.h"
......
......@@ -27,8 +27,8 @@
struct sexp_iterator;
#include "nettle/realloc.h"
#include "nettle/buffer.h"
#include <nettle/realloc.h>
#include <nettle/buffer.h>
struct spki_tag;
......
......@@ -7,8 +7,8 @@ top_srcdir = @top_srcdir@
include ../config.make
PRE_CPPFLAGS = -I.. -I$(top_srcdir) -I../nettle_builddir
PRE_LDFLAGS = -L.. -L../nettle_builddir
PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L..
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
......@@ -52,8 +52,7 @@ test-rules:
include $(srcdir)/.test-rules.make
check: $(TS_ALL)
LD_LIBRARY_PATH=../nettle_builddir/.lib srcdir=$(srcdir) \
$(srcdir)/run-tests $(TS_ALL)
srcdir=$(srcdir) $(srcdir)/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status testsuite/$@
......
#! /bin/sh
conv () {
echo "$1" | ../../nettle/tools/sexp-conv -s transport | tee test.in
echo "$1" | sexp-conv -s transport | tee test.in
}
die () {
......
#! /bin/sh
conv () {
../../nettle/tools/sexp-conv -s transport | tee test.in
sexp-conv -s transport | tee test.in
}
die () {
......@@ -12,7 +12,7 @@ die () {
check_sexp () {
file="$1"
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 "$@"
}
......
#! /bin/sh
conv () {
echo "$1" | ../../nettle/tools/sexp-conv -s transport | tee test.in
echo "$1" sexp-conv -s transport | tee test.in
}
die () {
......@@ -10,7 +10,7 @@ die () {
}
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`" \
|| die "Valid signature failed"
......
#! /bin/sh
# Test case from Oscar Cnovas Reverte
# Test case from Oscar Cánovas Reverte
conv () {
../../nettle/tools/sexp-conv -s transport
sexp-conv -s transport
}
die () {
......@@ -14,7 +14,7 @@ die () {
check_sexp () {
file="$1"
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 "$@"
}
......
......@@ -6,7 +6,7 @@
#include "parse.h"
#include "tag.h"
#include "nettle/sexp.h"
#include <nettle/sexp.h>
#include <stdio.h>
#include <stdlib.h>
......
......@@ -7,8 +7,8 @@ top_srcdir = @top_srcdir@
include ../config.make
PRE_CPPFLAGS = -I.. -I$(top_srcdir) -I../nettle_builddir
PRE_LDFLAGS = -L.. -L../nettle_builddir
PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L..
PROGRAM_LIBS = -lspki -lhogweed -lnettle $(LIBS)
......
......@@ -24,9 +24,9 @@
# include "config.h"
#endif
#include "nettle/bignum.h"
#include "nettle/dsa.h"
#include "nettle/rsa.h"
#include <nettle/bignum.h>
#include <nettle/dsa.h>
#include <nettle/rsa.h>
#include "certificate.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