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
This commit is contained in:
Love Hörnquist Åstrand
2006-02-28 14:11:21 +00:00
parent ab24f4fd05
commit 551b1a36fc

View File

@@ -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);