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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user