summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-07-12 14:57:02 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-07-12 14:57:02 +0000
commit748a607d6e4f5caac91dc3612866329cef546ed1 (patch)
tree306c0523b076a81eff38c9bc0f74e04a21558e9a
parentde3799321615e133888e620bc5847046e00b610c (diff)
fixed tiny bug in pad values and hmac inner hash lengths. should work now.
-rw-r--r--sys/netinet/ip_ah_new.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_ah_new.c b/sys/netinet/ip_ah_new.c
index e5aabc7a04f..34a7f723dc2 100644
--- a/sys/netinet/ip_ah_new.c
+++ b/sys/netinet/ip_ah_new.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah_new.c,v 1.1 1997/07/11 23:37:55 provos Exp $ */
+/* $OpenBSD: ip_ah_new.c,v 1.2 1997/07/12 14:57:01 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -217,7 +217,7 @@ ah_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m)
}
for (i = 0; i < blocklen; i++)
- buffer[i] ^= (HMAC_IPAD_VAL ^ HMAC_IPAD_VAL);
+ buffer[i] ^= (HMAC_IPAD_VAL ^ HMAC_OPAD_VAL);
switch (xd->amx_hash_algorithm)
{
@@ -536,7 +536,7 @@ ah_new_input(struct mbuf *m, struct tdb *tdb)
MD5Final((unsigned char *) (aho->ah_data), &md5ctx);
md5ctx = xd->amx_md5_octx;
MD5Update(&md5ctx, (unsigned char *) (aho->ah_data),
- AH_HMAC_HASHLEN);
+ AH_MD5_ALEN);
MD5Final((unsigned char *) (aho->ah_data), &md5ctx);
break;
@@ -544,7 +544,7 @@ ah_new_input(struct mbuf *m, struct tdb *tdb)
SHA1Final((unsigned char *) (aho->ah_data), &sha1ctx);
sha1ctx = xd->amx_sha1_octx;
SHA1Update(&sha1ctx, (unsigned char *) (aho->ah_data),
- AH_HMAC_HASHLEN);
+ AH_SHA1_ALEN);
SHA1Final((unsigned char *) (aho->ah_data), &sha1ctx);
break;
}