CMAC reset fix (from HEAD)

This commit is contained in:
Dr. Stephen Henson 2012-10-14 12:24:24 +00:00
parent 3e1beaf43e
commit fd9d2eaf16

View File

@ -153,6 +153,8 @@ int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
return 0; return 0;
if (!M_EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, zero_iv)) if (!M_EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, zero_iv))
return 0; return 0;
memset(ctx->tbl, 0, M_EVP_CIPHER_CTX_block_size(&ctx->cctx));
ctx->nlast_block = 0;
return 1; return 1;
} }
/* Initialiase context */ /* Initialiase context */