From 4f0b6e6775e4bd08cb2fc89a2f32c84c441f290d Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Thu, 9 Jun 2016 21:54:19 +0200 Subject: [PATCH] hmac/hmac.c: switch to OPENSSL_cleanse. Reviewed-by: Rich Salz --- crypto/hmac/hmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c index 51a0a3efcd..213504e85f 100644 --- a/crypto/hmac/hmac.c +++ b/crypto/hmac/hmac.c @@ -234,7 +234,7 @@ void HMAC_CTX_cleanup(HMAC_CTX *ctx) EVP_MD_CTX_cleanup(&ctx->i_ctx); EVP_MD_CTX_cleanup(&ctx->o_ctx); EVP_MD_CTX_cleanup(&ctx->md_ctx); - memset(ctx, 0, sizeof *ctx); + OPENSSL_cleanse(ctx, sizeof *ctx); } unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, -- 2.25.1