diff options
Diffstat (limited to 'mac.c')
-rw-r--r-- | mac.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mac.c,v 1.16 2011/08/02 01:22:11 djm Exp $ */ | 1 | /* $OpenBSD: mac.c,v 1.17 2011/12/02 00:43:57 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -44,6 +44,8 @@ | |||
44 | 44 | ||
45 | #include "umac.h" | 45 | #include "umac.h" |
46 | 46 | ||
47 | #include "openbsd-compat/openssl-compat.h" | ||
48 | |||
47 | #define SSH_EVP 1 /* OpenSSL EVP-based MAC */ | 49 | #define SSH_EVP 1 /* OpenSSL EVP-based MAC */ |
48 | #define SSH_UMAC 2 /* UMAC (not integrated with OpenSSL) */ | 50 | #define SSH_UMAC 2 /* UMAC (not integrated with OpenSSL) */ |
49 | 51 | ||
@@ -116,6 +118,7 @@ mac_init(Mac *mac) | |||
116 | case SSH_EVP: | 118 | case SSH_EVP: |
117 | if (mac->evp_md == NULL) | 119 | if (mac->evp_md == NULL) |
118 | return -1; | 120 | return -1; |
121 | HMAC_CTX_init(&mac->evp_ctx); | ||
119 | HMAC_Init(&mac->evp_ctx, mac->key, mac->key_len, mac->evp_md); | 122 | HMAC_Init(&mac->evp_ctx, mac->key, mac->key_len, mac->evp_md); |
120 | return 0; | 123 | return 0; |
121 | case SSH_UMAC: | 124 | case SSH_UMAC: |