summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/x509.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-11-30 06:36:38 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-11-30 06:36:38 +0000
commitf50ea1f0c3181ec05eb263c19abaa2d2a6a3b23f (patch)
tree27cf15c20d177f5c97c74dc5179e049415a51312 /sbin/isakmpd/x509.c
parent385386b812d72ac2ff84ba5fe475900c2e1623ce (diff)
x509_hash() should also ignore the id length (for matching purposes)
-- willey@serasystems.co
Diffstat (limited to 'sbin/isakmpd/x509.c')
-rw-r--r--sbin/isakmpd/x509.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/isakmpd/x509.c b/sbin/isakmpd/x509.c
index e093516faeb..43c85cb3a31 100644
--- a/sbin/isakmpd/x509.c
+++ b/sbin/isakmpd/x509.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.c,v 1.30 2000/11/23 12:57:07 niklas Exp $ */
+/* $OpenBSD: x509.c,v 1.31 2000/11/30 06:36:37 angelos Exp $ */
/* $EOM: x509.c,v 1.45 2000/11/23 12:51:21 niklas Exp $ */
/*
@@ -315,7 +315,7 @@ x509_hash (u_int8_t *id, size_t len)
u_int16_t bucket = 0;
/* XXX We might resize if we are crossing a certain threshold. */
- for (i = 0; i < (len & ~1); i += 2)
+ for (i = 4; i < (len & ~1); i += 2)
{
/* Doing it this way avoids alignment problems. */
bucket ^= (id[i] + 1) * (id[i + 1] + 257);