diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-01-27 11:24:46 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-01-27 11:24:46 +0000 |
commit | 56d57f2337659de8e0a7b7c22a89120aaacbc1a6 (patch) | |
tree | a69dbb1c3e616d62656c349990da88f270641521 /sbin/isakmpd/regress/rsakeygen | |
parent | 35d3367f7e29fc08a3756aadfe63ed55eca709a6 (diff) |
Cleanup the MP_FLAVOUR situation. Still needs work.
Diffstat (limited to 'sbin/isakmpd/regress/rsakeygen')
-rw-r--r-- | sbin/isakmpd/regress/rsakeygen/Makefile | 11 | ||||
-rw-r--r-- | sbin/isakmpd/regress/rsakeygen/rsakeygen.c | 7 |
2 files changed, 12 insertions, 6 deletions
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])) |