aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/cmac/cmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/cmac/cmac.c')
-rw-r--r--openssl/crypto/cmac/cmac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openssl/crypto/cmac/cmac.c b/openssl/crypto/cmac/cmac.c
index b58602680..8b72b0968 100644
--- a/openssl/crypto/cmac/cmac.c
+++ b/openssl/crypto/cmac/cmac.c
@@ -179,6 +179,8 @@ int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
return 0;
if (!EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, zero_iv))
return 0;
+ memset(ctx->tbl, 0, EVP_CIPHER_CTX_block_size(&ctx->cctx));
+ ctx->nlast_block = 0;
return 1;
}
/* Initialiase context */