From 551b1a36fc6f745869b6f6e544d189d24c0593f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 28 Feb 2006 14:11:21 +0000 Subject: [PATCH] Digest key when it exceeds block size, not when it exceeds the size of the output block. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16774 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/hmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/des/hmac.c b/lib/des/hmac.c index 8e41ce6bf..1d323b372 100644 --- a/lib/des/hmac.c +++ b/lib/des/hmac.c @@ -58,7 +58,7 @@ HMAC_Init_ex(HMAC_CTX *ctx, ctx->engine = engine; #endif - if (keylen > EVP_MD_size(ctx->md)) { + if (keylen > EVP_MD_block_size(ctx->md)) { EVP_Digest(key, keylen, ctx->buf, NULL, ctx->md, engine); key = ctx->buf; keylen = EVP_MD_size(ctx->md);