hmac/hmac.c: switch to OPENSSL_cleanse.
authorAndy Polyakov <appro@openssl.org>
Thu, 9 Jun 2016 19:54:19 +0000 (21:54 +0200)
committerAndy Polyakov <appro@openssl.org>
Sun, 12 Jun 2016 11:47:32 +0000 (13:47 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/hmac/hmac.c

index 51a0a3efcd672dd85914624b38613ce4958d3bec..213504e85fee582ac8848d869b9f74d6e4d1895c 100644 (file)
@@ -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,