summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-10-14 12:24:24 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-10-14 12:24:24 +0000
commitfd9d2eaf160a48b39ee76a4fc3ab0b8f45cd0483 (patch)
treec393bd9ef21796eb91b8e936ea0c14b5e75eba49
parent3e1beaf43e741b47c4bd03e864881d7294cebea7 (diff)
CMAC reset fix (from HEAD)
-rw-r--r--crypto/cmac/cmac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c
index e6cade6120..ccc7e7a3bd 100644
--- a/crypto/cmac/cmac.c
+++ b/crypto/cmac/cmac.c
@@ -153,6 +153,8 @@ int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
return 0;
if (!M_EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, zero_iv))
return 0;
+ memset(ctx->tbl, 0, M_EVP_CIPHER_CTX_block_size(&ctx->cctx));
+ ctx->nlast_block = 0;
return 1;
}
/* Initialiase context */