From: Dr. Stephen Henson Date: Wed, 11 Apr 2012 12:26:41 +0000 (+0000) Subject: make reinitialisation work for CMAC X-Git-Tag: master-post-reformat~1871 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=bbe0c8c5be6aa2cbbb60c4aa80990cb995955903;hp=5a34fcd76ed6a411b5cd33764cc02b1ce40fdb7a make reinitialisation work for CMAC --- diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index 064b67d073..88a323da9c 100644 --- a/crypto/cmac/cmac.c +++ b/crypto/cmac/cmac.c @@ -151,6 +151,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, bl); + ctx->nlast_block = 0; return 1; } /* Initialiase context */