diff options
author | 2000-11-30 06:36:37 +0000 | |
---|---|---|
committer | 2000-11-30 06:36:37 +0000 | |
commit | 9f7f115dfdc2e11995bd3eb01f4d6a295171059c (patch) | |
tree | d40ab1443847b666b5ac56d7093fd97596e60e17 | |
parent | document -u flag and environment variables (diff) | |
download | wireguard-openbsd-9f7f115dfdc2e11995bd3eb01f4d6a295171059c.tar.xz wireguard-openbsd-9f7f115dfdc2e11995bd3eb01f4d6a295171059c.zip |
x509_hash() should also ignore the id length (for matching purposes)
-- willey@serasystems.co
-rw-r--r-- | sbin/isakmpd/x509.c | 4 |
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); |