From 56d57f2337659de8e0a7b7c22a89120aaacbc1a6 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Sat, 27 Jan 2001 11:24:46 +0000 Subject: Cleanup the MP_FLAVOUR situation. Still needs work. --- sbin/isakmpd/regress/rsakeygen/Makefile | 11 ++++++++++- sbin/isakmpd/regress/rsakeygen/rsakeygen.c | 7 ++----- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'sbin/isakmpd/regress/rsakeygen') 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 #include -#if MP_FLAVOUR == MP_FLAVOUR_GMP -# include -#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])) -- cgit v1.2.3