From af010edd5528176cd39d024dc078f0a541043502 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sun, 3 Feb 2013 20:04:39 +0100 Subject: [PATCH 1/1] e_aes_cbc_hmac_sha1.c: cleanse temporary copy of HMAC secret. (cherry picked from commit 529d27ea472fc2c7ba9190a15a58cb84012d4ec6) --- crypto/evp/e_aes_cbc_hmac_sha1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c index 18fc921010..b7aff44d28 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -474,6 +474,8 @@ static int aesni_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void SHA1_Init(&key->tail); SHA1_Update(&key->tail,hmac_key,sizeof(hmac_key)); + OPENSSL_cleanse(hmac_key,sizeof(hmac_key)); + return 1; } case EVP_CTRL_AEAD_TLS1_AAD: -- 2.25.1