summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hmac/hmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/hmac/hmac.c')
-rw-r--r--src/lib/libcrypto/hmac/hmac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/libcrypto/hmac/hmac.c b/src/lib/libcrypto/hmac/hmac.c
index 6c98fc43a3..45015fe754 100644
--- a/src/lib/libcrypto/hmac/hmac.c
+++ b/src/lib/libcrypto/hmac/hmac.c
@@ -138,9 +138,12 @@ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
138 138
139int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len) 139int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len)
140 { 140 {
141 int j;
141 unsigned int i; 142 unsigned int i;
142 unsigned char buf[EVP_MAX_MD_SIZE]; 143 unsigned char buf[EVP_MAX_MD_SIZE];
143 144
145 j=EVP_MD_block_size(ctx->md);
146
144 if (!EVP_DigestFinal_ex(&ctx->md_ctx,buf,&i)) 147 if (!EVP_DigestFinal_ex(&ctx->md_ctx,buf,&i))
145 goto err; 148 goto err;
146 if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->o_ctx)) 149 if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->o_ctx))