From: Andy Polyakov Date: Thu, 9 Jun 2016 19:54:19 +0000 (+0200) Subject: hmac/hmac.c: switch to OPENSSL_cleanse. X-Git-Tag: OpenSSL_1_0_2i~154 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=4f0b6e6775e4bd08cb2fc89a2f32c84c441f290d hmac/hmac.c: switch to OPENSSL_cleanse. Reviewed-by: Rich Salz --- 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,