diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2002-11-21 09:40:35 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2002-11-21 09:40:35 +0000 |
commit | 111e8cf96598d26e13d29b6ed645cd75258191d4 (patch) | |
tree | 0382484351a63e32029068174480c58ddcc462f6 /sbin/isakmpd/hash.c | |
parent | 2536c5ff25921a67417bca335806fddf2572d956 (diff) |
hmac_init and prf_alloc should use unsigned lengths. Problem pointed out by Patrick Latifi.
Diffstat (limited to 'sbin/isakmpd/hash.c')
-rw-r--r-- | sbin/isakmpd/hash.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/isakmpd/hash.c b/sbin/isakmpd/hash.c index 862e2675a3b..24d672bfb20 100644 --- a/sbin/isakmpd/hash.c +++ b/sbin/isakmpd/hash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash.c,v 1.10 2002/08/23 18:17:17 ho Exp $ */ +/* $OpenBSD: hash.c,v 1.11 2002/11/21 09:40:34 ho Exp $ */ /* $EOM: hash.c,v 1.10 1999/04/17 23:20:34 niklas Exp $ */ /* @@ -50,7 +50,7 @@ #include "hash.h" #include "log.h" -void hmac_init (struct hash *, unsigned char *, int); +void hmac_init (struct hash *, unsigned char *, unsigned int); void hmac_final (unsigned char *, struct hash *); /* Temporary hash contexts. */ @@ -100,9 +100,9 @@ hash_get (enum hashes hashtype) */ void -hmac_init (struct hash *hash, unsigned char *okey, int len) +hmac_init (struct hash *hash, unsigned char *okey, unsigned int len) { - int i, blocklen = HMAC_BLOCKLEN; + unsigned int i, blocklen = HMAC_BLOCKLEN; unsigned char key[HMAC_BLOCKLEN]; memset (key, 0, blocklen); |