diff options
-rw-r--r-- | sbin/isakmpd/Makefile | 6 | ||||
-rw-r--r-- | sbin/isakmpd/crypto.c | 4 | ||||
-rw-r--r-- | sbin/isakmpd/regress/crypto/Makefile | 4 | ||||
-rw-r--r-- | sbin/isakmpd/sa.c | 10 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/freebsd/GNUmakefile.sysdep | 4 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/freebsd/Makefile.sysdep | 4 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/linux/GNUmakefile.sysdep | 6 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/linux/klips.c | 20 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/netbsd/GNUmakefile.sysdep | 4 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/netbsd/Makefile.sysdep | 4 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/openbsd-encap/GNUmakefile.sysdep | 4 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/openbsd-encap/Makefile.sysdep | 4 |
12 files changed, 32 insertions, 42 deletions
diff --git a/sbin/isakmpd/Makefile b/sbin/isakmpd/Makefile index 31ca6cc60b2..e0251550cdc 100644 --- a/sbin/isakmpd/Makefile +++ b/sbin/isakmpd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.31 2001/01/27 12:03:31 niklas Exp $ +# $OpenBSD: Makefile,v 1.32 2001/02/24 04:42:47 angelos Exp $ # $EOM: Makefile,v 1.78 2000/10/15 21:33:42 niklas Exp $ # @@ -51,9 +51,9 @@ OS= openbsd #OS= linux # Compile-time configuration of otherwise optional features -#FEATURES= tripledes blowfish cast policy x509 ec aggressive debug gmp +#FEATURES= tripledes des blowfish cast policy x509 ec aggressive debug gmp #FEATURES+= dnssec -FEATURES= tripledes blowfish cast policy x509 ec aggressive debug +FEATURES= tripledes des blowfish cast policy x509 ec aggressive debug #FEATURES= .PATH: ${.CURDIR}/sysdep/${OS} diff --git a/sbin/isakmpd/crypto.c b/sbin/isakmpd/crypto.c index 74cca633a03..7c776d56169 100644 --- a/sbin/isakmpd/crypto.c +++ b/sbin/isakmpd/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.10 2000/03/08 08:41:41 niklas Exp $ */ +/* $OpenBSD: crypto.c,v 1.11 2001/02/24 04:42:48 angelos Exp $ */ /* $EOM: crypto.c,v 1.32 2000/03/07 20:08:51 niklas Exp $ */ /* @@ -58,11 +58,13 @@ void cast1_encrypt (struct keystate *, u_int8_t *, u_int16_t); void cast1_decrypt (struct keystate *, u_int8_t *, u_int16_t); struct crypto_xf transforms[] = { +#ifdef USE_DES { DES_CBC, "Data Encryption Standard (CBC-Mode)", 8, 8, BLOCKSIZE, 0, des1_init, des1_encrypt, des1_decrypt }, +#endif #ifdef USE_TRIPLEDES { TRIPLEDES_CBC, "Triple-DES (CBC-Mode)", 24, 24, BLOCKSIZE, 0, diff --git a/sbin/isakmpd/regress/crypto/Makefile b/sbin/isakmpd/regress/crypto/Makefile index a9f04df54c9..8aada0ac875 100644 --- a/sbin/isakmpd/regress/crypto/Makefile +++ b/sbin/isakmpd/regress/crypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2000/04/07 22:06:10 niklas Exp $ +# $OpenBSD: Makefile,v 1.7 2001/02/24 04:42:48 angelos Exp $ # $EOM: Makefile,v 1.7 2000/03/28 21:22:06 ho Exp $ # Test Crypto: @@ -10,7 +10,7 @@ TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f- OS!= awk '/^OS=/ { print $$2 }' ${.CURDIR}/../../Makefile .PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ} CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall \ - -DUSE_TRIPLEDES -DUSE_CAST -DUSE_BLOWFISH + -DUSE_TRIPLEDES -DUSE_CAST -DUSE_BLOWFISH -DUSE_DES LDADD+= -ldes DPADD+= ${LIBDES} NOMAN= diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c index 6525721c1fa..ee0efb44c3c 100644 --- a/sbin/isakmpd/sa.c +++ b/sbin/isakmpd/sa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sa.c,v 1.37 2001/01/27 12:03:36 niklas Exp $ */ +/* $OpenBSD: sa.c,v 1.38 2001/02/24 04:42:48 angelos Exp $ */ /* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */ /* @@ -59,6 +59,10 @@ #include "cert.h" #include "policy.h" +#ifndef SA_LEN +#define SA_LEN(x) (x)->sa_len +#endif + /* Initial number of bits from the cookies used as hash. */ #define INITIAL_BUCKET_BITS 6 @@ -223,8 +227,8 @@ isakmp_sa_check (struct sa *sa, void *v_arg) /* verify address is either src or dst for this sa */ sa->transport->vtbl->get_dst (sa->transport, &dst, &dstlen); sa->transport->vtbl->get_src (sa->transport, &src, &srclen); - if (memcmp (src, arg->dst, src->sa_len) && - memcmp (dst, arg->dst, dst->sa_len)) + if (memcmp (src, arg->dst, SA_LEN(src)) && + memcmp (dst, arg->dst, SA_LEN(dst))) return 0; /* match icookie+rcookie against spi */ diff --git a/sbin/isakmpd/sysdep/freebsd/GNUmakefile.sysdep b/sbin/isakmpd/sysdep/freebsd/GNUmakefile.sysdep index 078011d70cc..71c262be8d7 100644 --- a/sbin/isakmpd/sysdep/freebsd/GNUmakefile.sysdep +++ b/sbin/isakmpd/sysdep/freebsd/GNUmakefile.sysdep @@ -1,4 +1,4 @@ -# $OpenBSD: GNUmakefile.sysdep,v 1.2 2001/01/28 22:38:48 niklas Exp $ +# $OpenBSD: GNUmakefile.sysdep,v 1.3 2001/02/24 04:42:48 angelos Exp $ # # Copyright (c) 1999 Håkan Olsson. All rights reserved. @@ -42,7 +42,7 @@ LIBSYSDEP:= ${LIBSYSDEPDIR}/libsysdep.a LDADD+= -lgmp ${LIBSYSDEP} DPADD+= ${LIBGMP} ${LIBSYSDEP} -FEATURES= debug tripledes blowdish cast ec aggressive +FEATURES= debug tripledes des blowdish cast ec aggressive # Not yet #FEATURES+= policy x509 diff --git a/sbin/isakmpd/sysdep/freebsd/Makefile.sysdep b/sbin/isakmpd/sysdep/freebsd/Makefile.sysdep index 9e9420492c4..dbf36698be9 100644 --- a/sbin/isakmpd/sysdep/freebsd/Makefile.sysdep +++ b/sbin/isakmpd/sysdep/freebsd/Makefile.sysdep @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sysdep,v 1.2 2001/01/28 22:38:48 niklas Exp $ +# $OpenBSD: Makefile.sysdep,v 1.3 2001/02/24 04:42:48 angelos Exp $ # # Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -34,7 +34,7 @@ # # Override default features -FEATURES= tripledes blowfish cast ec aggressive debug +FEATURES= tripledes des blowfish cast ec aggressive debug .if defined(TOPDIR) LIBSYSDEPDIR= ${TOPDIR}/sysdep/common/libsysdep diff --git a/sbin/isakmpd/sysdep/linux/GNUmakefile.sysdep b/sbin/isakmpd/sysdep/linux/GNUmakefile.sysdep index 2a02b3726d1..a8fc6594985 100644 --- a/sbin/isakmpd/sysdep/linux/GNUmakefile.sysdep +++ b/sbin/isakmpd/sysdep/linux/GNUmakefile.sysdep @@ -1,4 +1,4 @@ -# $OpenBSD: GNUmakefile.sysdep,v 1.2 2001/01/28 22:38:48 niklas Exp $ +# $OpenBSD: GNUmakefile.sysdep,v 1.3 2001/02/24 04:42:48 angelos Exp $ # # Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -48,7 +48,7 @@ BINDIR= /usr/local/sbin #MAN8= isakmpd.0 NOMAN= -LIBGMP= ${FREESWAN}/gmp/libgmp.a +LIBGMP= -lgmp LIBDES= ${FREESWAN}/libdes/libdes.a LIBSYSDEPDIR= ${.CURDIR}/sysdep/common/libsysdep LIBSYSDEP= ${LIBSYSDEPDIR}/libsysdep.a @@ -63,6 +63,8 @@ DPADD+= ${LIBSYSDEP} ${LIBGMP} ${LIBDES} CFLAGS+= -I${FREESWAN}/gmp -I${FREESWAN}/libdes \ -I${FREESWAN}/klips -I${FREESWAN}/lib -DUSE_OLD_SOCKADDR \ -I${.CURDIR}/sysdep/common -DSYMBOL_PREFIX='"_"' +CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP +CFLAGS+= -D'SALEN(x)=8' HAVE_DLOPEN= defined diff --git a/sbin/isakmpd/sysdep/linux/klips.c b/sbin/isakmpd/sysdep/linux/klips.c index 4b90baccfb5..34a03a78544 100644 --- a/sbin/isakmpd/sysdep/linux/klips.c +++ b/sbin/isakmpd/sysdep/linux/klips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: klips.c,v 1.3 2001/02/24 03:59:57 angelos Exp $ */ +/* $OpenBSD: klips.c,v 1.4 2001/02/24 04:42:49 angelos Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -241,32 +241,14 @@ klips_set_spi (struct sa *sa, struct proto *proto, int incoming) /* Funny expression due to I just want one switch. */ switch (proto->id | (iproto->auth << 8)) { - case IPSEC_ESP_DES: - case IPSEC_ESP_DES_IV32: - case IPSEC_ESP_DES_IV64: - emsg->em_alg = XF_ESPDES; - break; - case IPSEC_ESP_3DES: emsg->em_alg = XF_ESP3DES; break; - case IPSEC_ESP_DES | (IPSEC_AUTH_HMAC_MD5 << 8): - case IPSEC_ESP_DES_IV32 | (IPSEC_AUTH_HMAC_MD5 << 8): - case IPSEC_ESP_DES_IV64 | (IPSEC_AUTH_HMAC_MD5 << 8): - emsg->em_alg = XF_ESPDESMD596; - break; - case IPSEC_ESP_3DES | (IPSEC_AUTH_HMAC_MD5 << 8): emsg->em_alg = XF_ESP3DESMD596; break; - case IPSEC_ESP_DES | (IPSEC_AUTH_HMAC_SHA << 8): - case IPSEC_ESP_DES_IV32 | (IPSEC_AUTH_HMAC_SHA << 8): - case IPSEC_ESP_DES_IV64 | (IPSEC_AUTH_HMAC_SHA << 8): - emsg->em_alg = XF_ESPDESSHA196; - break; - case IPSEC_ESP_3DES | (IPSEC_AUTH_HMAC_SHA << 8): emsg->em_alg = XF_ESP3DESSHA196; break; diff --git a/sbin/isakmpd/sysdep/netbsd/GNUmakefile.sysdep b/sbin/isakmpd/sysdep/netbsd/GNUmakefile.sysdep index 36662f6035e..98591ec5238 100644 --- a/sbin/isakmpd/sysdep/netbsd/GNUmakefile.sysdep +++ b/sbin/isakmpd/sysdep/netbsd/GNUmakefile.sysdep @@ -1,4 +1,4 @@ -# $OpenBSD: GNUmakefile.sysdep,v 1.2 2001/01/28 22:38:49 niklas Exp $ +# $OpenBSD: GNUmakefile.sysdep,v 1.3 2001/02/24 04:42:49 angelos Exp $ # # Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -36,7 +36,7 @@ LIBSYSDEP:= ${LIBSYSDEPDIR}/libsysdep.a LDADD+= ${LIBGMP} ${LIBSYSDEP} DPADD+= ${LIBGMP} ${LIBSYSDEP} -FEATURES= debug tripledes blowfish cast ec aggressive +FEATURES= debug tripledes des blowfish cast ec aggressive # Not yet #FEATURES+= policy x509 diff --git a/sbin/isakmpd/sysdep/netbsd/Makefile.sysdep b/sbin/isakmpd/sysdep/netbsd/Makefile.sysdep index e11d9bab177..4849d1eaa91 100644 --- a/sbin/isakmpd/sysdep/netbsd/Makefile.sysdep +++ b/sbin/isakmpd/sysdep/netbsd/Makefile.sysdep @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sysdep,v 1.3 2001/01/28 22:38:49 niklas Exp $ +# $OpenBSD: Makefile.sysdep,v 1.4 2001/02/24 04:42:49 angelos Exp $ # # Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -28,7 +28,7 @@ # # Override default features -FEATURES= tripledes blowfish cast ec aggressive debug +FEATURES= tripledes des blowfish cast ec aggressive debug # Not yet #FEATURES+= policy x509 diff --git a/sbin/isakmpd/sysdep/openbsd-encap/GNUmakefile.sysdep b/sbin/isakmpd/sysdep/openbsd-encap/GNUmakefile.sysdep index 77f89d8259d..775b2cd215a 100644 --- a/sbin/isakmpd/sysdep/openbsd-encap/GNUmakefile.sysdep +++ b/sbin/isakmpd/sysdep/openbsd-encap/GNUmakefile.sysdep @@ -1,4 +1,4 @@ -# $OpenBSD: GNUmakefile.sysdep,v 1.2 2001/01/28 22:38:49 niklas Exp $ +# $OpenBSD: GNUmakefile.sysdep,v 1.3 2001/02/24 04:42:49 angelos Exp $ # # Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -34,7 +34,7 @@ # # Compile-time configuration of otherwise optional features -FEATURES= tripledes blowfish cast policy x509 ec aggressive debug +FEATURES= tripledes des blowfish cast policy x509 ec aggressive debug LIBGMP:= /usr/lib/libgmp.a LIBDES:= /usr/lib/libdes.a diff --git a/sbin/isakmpd/sysdep/openbsd-encap/Makefile.sysdep b/sbin/isakmpd/sysdep/openbsd-encap/Makefile.sysdep index 43dd59a39ab..df92ed19e48 100644 --- a/sbin/isakmpd/sysdep/openbsd-encap/Makefile.sysdep +++ b/sbin/isakmpd/sysdep/openbsd-encap/Makefile.sysdep @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sysdep,v 1.2 2001/01/28 22:38:49 niklas Exp $ +# $OpenBSD: Makefile.sysdep,v 1.3 2001/02/24 04:42:49 angelos Exp $ # # Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -33,7 +33,7 @@ # This code was written under funding by Ericsson Radio Systems. # -FEATURES+= gmp +FEATURES+= gmp tripledes des IPSEC_SRCS= pf_encap.c |