summaryrefslogtreecommitdiffstats
path: root/crypto/cmac
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-04-11 12:26:27 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-04-11 12:26:27 +0000
commit737fe7ea29e42160d6b3e3260f5a54e1d9fb8d81 (patch)
tree664444c73025e1d2ed5c4ea2db47258a3e8d7dee /crypto/cmac
parentb344a826adf91f61aeb519249f519e6f3cb5717d (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 */