summaryrefslogtreecommitdiffstats
path: root/crypto/cmac
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-04-11 12:26:13 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-04-11 12:26:13 +0000
commita7612c506624a8f249703fbfd7cf2131826a17fc (patch)
treecb4f34a06dce4aec824ee62428bbd58626215046 /crypto/cmac
parent6cbae10b5e2c3bc48af9a8cd6b4b1145f0121273 (diff)
make reinitialisation work for CMAC
Diffstat (limited to 'crypto/cmac')
-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 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 */