diff options
Diffstat (limited to 'mac.c')
-rw-r--r-- | mac.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: mac.c,v 1.5 2002/05/16 22:02:50 markus Exp $"); | 26 | RCSID("$OpenBSD: mac.c,v 1.6 2003/09/18 13:02:21 miod Exp $"); |
27 | 27 | ||
28 | #include <openssl/hmac.h> | 28 | #include <openssl/hmac.h> |
29 | 29 | ||
@@ -77,7 +77,7 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen) | |||
77 | 77 | ||
78 | if (mac->key == NULL) | 78 | if (mac->key == NULL) |
79 | fatal("mac_compute: no key"); | 79 | fatal("mac_compute: no key"); |
80 | if (mac->mac_len > sizeof(m)) | 80 | if ((u_int)mac->mac_len > sizeof(m)) |
81 | fatal("mac_compute: mac too long"); | 81 | fatal("mac_compute: mac too long"); |
82 | HMAC_Init(&c, mac->key, mac->key_len, mac->md); | 82 | HMAC_Init(&c, mac->key, mac->key_len, mac->md); |
83 | PUT_32BIT(b, seqno); | 83 | PUT_32BIT(b, seqno); |