Don't use deprecated EVP_CIPHER_CTX_cleanup() internally
authorRichard Levitte <levitte@openssl.org>
Wed, 1 Mar 2017 09:48:34 +0000 (10:48 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 1 Mar 2017 10:42:50 +0000 (11:42 +0100)
Use EVP_CIPHER_CTX_reset() instead

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2812)

crypto/cmac/cmac.c

index 0f4ca26bc2834e38af3907dc48de1bc732d72ee3..46e3cb7912a61e3f78b90760b72b4b6d862eb629 100644 (file)
@@ -60,7 +60,7 @@ CMAC_CTX *CMAC_CTX_new(void)
 
 void CMAC_CTX_cleanup(CMAC_CTX *ctx)
 {
-    EVP_CIPHER_CTX_cleanup(ctx->cctx);
+    EVP_CIPHER_CTX_reset(ctx->cctx);
     OPENSSL_cleanse(ctx->tbl, EVP_MAX_BLOCK_LENGTH);
     OPENSSL_cleanse(ctx->k1, EVP_MAX_BLOCK_LENGTH);
     OPENSSL_cleanse(ctx->k2, EVP_MAX_BLOCK_LENGTH);