From: Dr. Stephen Henson Date: Wed, 11 Apr 2012 12:26:13 +0000 (+0000) Subject: make reinitialisation work for CMAC X-Git-Tag: OpenSSL_1_0_1a~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7612c506624a8f249703fbfd7cf2131826a17fc;p=openssl make reinitialisation work for CMAC --- diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index b58602680b..7ae776e3fc 100644 --- a/crypto/cmac/cmac.c +++ b/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, bl); + ctx->nlast_block = 0; return 1; } /* Initialiase context */