summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2010-11-29 22:49:27 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2010-11-29 22:49:27 +0000
commitd1ef90c9d6f1b967904a32d664bb5f6c53e389ab (patch)
treef82b68865bde3f811daf803b389d6c2992fe5106 /sbin/iked
parent8714670713169b2fa3189575478e18b0c539d8da (diff)
make key exchange faster by not checking the predefined groups with DH_check()
ok mikeb@, djm@
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/dh.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sbin/iked/dh.c b/sbin/iked/dh.c
index 15db3fdaa4c..dc8b6fe5b66 100644
--- a/sbin/iked/dh.c
+++ b/sbin/iked/dh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.c,v 1.4 2010/06/29 19:38:26 reyk Exp $ */
+/* $OpenBSD: dh.c,v 1.5 2010/11/29 22:49:26 markus Exp $ */
/* $vantronix: dh.c,v 1.13 2010/05/28 15:34:35 reyk Exp $ */
/*
@@ -401,13 +401,10 @@ modp_getlen(struct group *group)
int
modp_create_exchange(struct group *group, u_int8_t *buf)
{
- int codes;
DH *dh = group->dh;
if (!DH_generate_key(dh))
return (-1);
- if (!DH_check(dh, &codes))
- return (-1);
if (!BN_bn2bin(dh->pub_key, buf))
return (-1);