From: Dr. Stephen Henson Date: Sun, 14 Oct 2012 12:24:24 +0000 (+0000) Subject: CMAC reset fix (from HEAD) X-Git-Tag: OpenSSL-fips-2_0-pl1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd9d2eaf160a48b39ee76a4fc3ab0b8f45cd0483;p=thirdparty%2Fopenssl.git CMAC reset fix (from HEAD) --- diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index e6cade61200..ccc7e7a3bd6 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 */