summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/isakmpd/apps/certpatch/Makefile11
-rw-r--r--sbin/isakmpd/apps/certpatch/certpatch.c9
-rw-r--r--sbin/isakmpd/regress/dh/Makefile13
-rw-r--r--sbin/isakmpd/regress/group/Makefile13
-rw-r--r--sbin/isakmpd/regress/rsakeygen/Makefile11
-rw-r--r--sbin/isakmpd/regress/rsakeygen/rsakeygen.c7
-rw-r--r--sbin/isakmpd/regress/x509/Makefile10
-rw-r--r--sbin/isakmpd/regress/x509/x509test.c11
-rw-r--r--sbin/isakmpd/sysdep/openbsd/Makefile.sysdep4
9 files changed, 62 insertions, 27 deletions
diff --git a/sbin/isakmpd/apps/certpatch/Makefile b/sbin/isakmpd/apps/certpatch/Makefile
index 725e982fb73..335fea6485e 100644
--- a/sbin/isakmpd/apps/certpatch/Makefile
+++ b/sbin/isakmpd/apps/certpatch/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2000/04/07 22:06:36 niklas Exp $
+# $OpenBSD: Makefile,v 1.4 2001/01/27 11:24:39 niklas Exp $
# $EOM: Makefile,v 1.6 2000/03/28 21:22:06 ho Exp $
#
@@ -40,12 +40,21 @@ BINDIR= /usr/sbin
TOPSRC= ${.CURDIR}/../..
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+FEATURES!= awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//'
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall
LDADD+= -lcrypto
DPADD+= ${LIBCRYPTO}
MAN= certpatch.8
+.if ${FEATURES:Mgmp} == "gmp"
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP
+LDADD+= -lgmp
+DPADD+= ${LIBGMP}
+.else
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL
+.endif
+
.include "${TOPSRC}/sysdep/${OS}/Makefile.sysdep"
# Override LIBSYSDEPDIR definition from Makefile.sysdep
LIBSYSDEPDIR= ${TOPSRC}/sysdep/common/libsysdep
diff --git a/sbin/isakmpd/apps/certpatch/certpatch.c b/sbin/isakmpd/apps/certpatch/certpatch.c
index 92b61efa535..06ad17657bf 100644
--- a/sbin/isakmpd/apps/certpatch/certpatch.c
+++ b/sbin/isakmpd/apps/certpatch/certpatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: certpatch.c,v 1.12 2001/01/26 11:08:22 niklas Exp $ */
+/* $OpenBSD: certpatch.c,v 1.13 2001/01/27 11:24:39 niklas Exp $ */
/* $EOM: certpatch.c,v 1.11 2000/12/21 14:50:09 ho Exp $ */
/*
@@ -58,10 +58,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#if MP_FLAVOUR == MP_FLAVOUR_GMP
-# include <gmp.h>
-#endif
-
#include "sysdep.h"
#ifdef KAME
@@ -76,8 +72,9 @@
#include <openssl/pem.h>
#include "conf.h"
-#include "log.h"
#include "ipsec_num.h"
+#include "log.h"
+#include "math_mp.h"
#include "x509.h"
#define IDTYPE_IP "ip"
diff --git a/sbin/isakmpd/regress/dh/Makefile b/sbin/isakmpd/regress/dh/Makefile
index e3dcf51cd10..3416377d463 100644
--- a/sbin/isakmpd/regress/dh/Makefile
+++ b/sbin/isakmpd/regress/dh/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 2000/04/07 22:04:24 niklas Exp $
+# $OpenBSD: Makefile,v 1.7 2001/01/27 11:24:41 niklas Exp $
# $EOM: Makefile,v 1.10 2000/04/07 20:19:43 niklas Exp $
# Test DH:
@@ -9,12 +9,21 @@ SRCS= math_2n.c math_ec2n.c math_group.c dh.c dhtest.c log.c util.c \
TOPSRC= ${.CURDIR}/../..
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+FEATURES!= awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//'
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall \
- -DUSE_EC -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL
+ -DUSE_EC
NOMAN=
LDADD+= -lcrypto
DPADD+= ${LIBCRYPTO}
DEBUG= -g
+.if ${FEATURES:Mgmp} == "gmp"
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP
+LDADD+= -lgmp
+DPADD+= ${LIBGMP}
+.else
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL
+.endif
+
.include <bsd.prog.mk>
diff --git a/sbin/isakmpd/regress/group/Makefile b/sbin/isakmpd/regress/group/Makefile
index 95db32de841..e15fef033f7 100644
--- a/sbin/isakmpd/regress/group/Makefile
+++ b/sbin/isakmpd/regress/group/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 2000/04/07 22:04:24 niklas Exp $
+# $OpenBSD: Makefile,v 1.7 2001/01/27 11:24:42 niklas Exp $
# $EOM: Makefile,v 1.12 2000/04/07 20:19:43 niklas Exp $
# Test Group:
@@ -9,12 +9,21 @@ SRCS= math_2n.c math_ec2n.c math_group.c grouptest.c log.c util.c \
TOPSRC= ${.CURDIR}/../..
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+FEATURES!= awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//'
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall \
- -DUSE_EC -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL
+ -DUSE_EC
NOMAN=
LDADD+= -lcrypto
DPADD+= ${LIBCRYPTO}
DEBUG= -g
+.if ${FEATURES:Mgmp} == "gmp"
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP
+LDADD+= -lgmp
+DPADD+= ${LIBGMP}
+.else
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL
+.endif
+
.include <bsd.prog.mk>
diff --git a/sbin/isakmpd/regress/rsakeygen/Makefile b/sbin/isakmpd/regress/rsakeygen/Makefile
index 9a42fedbc20..b25f445fd2e 100644
--- a/sbin/isakmpd/regress/rsakeygen/Makefile
+++ b/sbin/isakmpd/regress/rsakeygen/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 2000/04/07 22:07:18 niklas Exp $
+# $OpenBSD: Makefile,v 1.11 2001/01/27 11:24:43 niklas Exp $
# $EOM: Makefile,v 1.10 2000/03/28 21:23:24 ho Exp $
#
@@ -42,12 +42,21 @@ SRCS= libcrypto.c log.c rsakeygen.c sysdep.c util.c
TOPSRC= ${.CURDIR}/../..
TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f-
OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile
+FEATURES!= awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//'
.PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ}
CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall \
-DUSE_DEBUG
NOMAN=
DEBUG= -g
+.if ${FEATURES:Mgmp} == "gmp"
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP
+LDADD+= -lgmp
+DPADD+= ${LIBGMP}
+.else
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL
+.endif
+
.include "${TOPSRC}/sysdep/${OS}/Makefile.sysdep"
.ifdef HAVE_DLOPEN
diff --git a/sbin/isakmpd/regress/rsakeygen/rsakeygen.c b/sbin/isakmpd/regress/rsakeygen/rsakeygen.c
index 5833e3a6cb9..f2ddbc8fad7 100644
--- a/sbin/isakmpd/regress/rsakeygen/rsakeygen.c
+++ b/sbin/isakmpd/regress/rsakeygen/rsakeygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsakeygen.c,v 1.11 2001/01/26 11:08:24 niklas Exp $ */
+/* $OpenBSD: rsakeygen.c,v 1.12 2001/01/27 11:24:43 niklas Exp $ */
/* $EOM: rsakeygen.c,v 1.10 2000/12/21 15:18:53 ho Exp $ */
/*
@@ -41,12 +41,9 @@
#include <stdio.h>
#include <string.h>
-#if MP_FLAVOUR == MP_FLAVOUR_GMP
-# include <gmp.h>
-#endif
-
#include "libcrypto.h"
#include "log.h"
+#include "math_mp.h"
#define nibble2bin(y) (tolower (y) < 'a' ? (y) - '0' : tolower (y) - 'a' + 10)
#define hexchar2bin(x) ((nibble2bin ((x)[0]) << 4) + nibble2bin ((x)[1]))
diff --git a/sbin/isakmpd/regress/x509/Makefile b/sbin/isakmpd/regress/x509/Makefile
index ea9feffab78..83890f0d3f2 100644
--- a/sbin/isakmpd/regress/x509/Makefile
+++ b/sbin/isakmpd/regress/x509/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 2000/10/07 07:00:53 niklas Exp $
+# $OpenBSD: Makefile,v 1.11 2001/01/27 11:24:44 niklas Exp $
# $EOM: Makefile,v 1.16 2000/09/28 12:53:27 niklas Exp $
#
@@ -51,6 +51,14 @@ CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall \
NOMAN=
DEBUG= -g
+.if ${FEATURES:Mgmp} == "gmp"
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP
+LDADD+= -lgmp
+DPADD+= ${LIBGMP}
+.else
+CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL
+.endif
+
.include "${TOPSRC}/sysdep/${OS}/Makefile.sysdep"
.ifdef HAVE_DLOPEN
diff --git a/sbin/isakmpd/regress/x509/x509test.c b/sbin/isakmpd/regress/x509/x509test.c
index b14a0591ddf..a377bf87d41 100644
--- a/sbin/isakmpd/regress/x509/x509test.c
+++ b/sbin/isakmpd/regress/x509/x509test.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509test.c,v 1.13 2001/01/26 12:35:47 niklas Exp $ */
+/* $OpenBSD: x509test.c,v 1.14 2001/01/27 11:24:44 niklas Exp $ */
/* $EOM: x509test.c,v 1.9 2000/12/21 15:24:25 ho Exp $ */
/*
@@ -59,15 +59,12 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#if MP_FLAVOUR == MP_FLAVOUR_GMP
-# include <gmp.h>
-#endif
-
#include "conf.h"
-#include "libcrypto.h"
-#include "log.h"
#include "ipsec_num.h"
#include "isakmp_fld.h"
+#include "libcrypto.h"
+#include "log.h"
+#include "math_mp.h"
#include "x509.h"
u_int32_t file_sz;
diff --git a/sbin/isakmpd/sysdep/openbsd/Makefile.sysdep b/sbin/isakmpd/sysdep/openbsd/Makefile.sysdep
index d218929b5c4..7738fcd8720 100644
--- a/sbin/isakmpd/sysdep/openbsd/Makefile.sysdep
+++ b/sbin/isakmpd/sysdep/openbsd/Makefile.sysdep
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sysdep,v 1.13 2001/01/26 11:09:22 niklas Exp $
+# $OpenBSD: Makefile.sysdep,v 1.14 2001/01/27 11:24:45 niklas Exp $
# $EOM: Makefile.sysdep,v 1.18 2001/01/26 10:55:22 niklas Exp $
#
@@ -50,7 +50,7 @@ USE_LIBCRYPTO= defined
.ifdef FEATURES
.if ${FEATURES:Mpolicy} == "policy"
.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "vax" && ${MACHINE_ARCH} != "m88k"
-SRCS+= keynote_compat.c
+POLICY+= keynote_compat.c
.endif
USE_KEYNOTE= defined
.endif