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.3 2001/12/19 07:18:56 deraadt Exp $"); | 26 | RCSID("$OpenBSD: mac.c,v 1.4 2002/01/25 22:07:40 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/hmac.h> | 28 | #include <openssl/hmac.h> |
29 | 29 | ||
@@ -56,7 +56,7 @@ mac_init(Mac *mac, char *name) | |||
56 | if (strcmp(name, macs[i].name) == 0) { | 56 | if (strcmp(name, macs[i].name) == 0) { |
57 | if (mac != NULL) { | 57 | if (mac != NULL) { |
58 | mac->md = (*macs[i].mdfunc)(); | 58 | mac->md = (*macs[i].mdfunc)(); |
59 | mac->key_len = mac->mac_len = mac->md->md_size; | 59 | mac->key_len = mac->mac_len = EVP_MD_size(mac->md); |
60 | if (macs[i].truncatebits != 0) | 60 | if (macs[i].truncatebits != 0) |
61 | mac->mac_len = macs[i].truncatebits/8; | 61 | mac->mac_len = macs[i].truncatebits/8; |
62 | } | 62 | } |