summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/regress
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/isakmpd/regress')
-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
6 files changed, 47 insertions, 18 deletions
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;