Make sure the rand_byte buffer in padlock engine is cleansed.

Submitted by Michael McConville <mmcco@mykolab.com>

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Richard Levitte 2016-04-04 16:55:12 +02:00
parent 4b8736a22e
commit 6c13488c4e

View File

@ -776,7 +776,7 @@ static int padlock_rand_bytes(unsigned char *output, int count)
*output++ = (unsigned char)buf;
count--;
}
*(volatile unsigned int *)&buf = 0;
OPENSSL_cleanse(&buf, sizeof(buf));
return 1;
}