mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 17:55:37 +00:00
Add double check for checking if source is strong
To prevent glitching past a strong source.
This commit is contained in:
parent
552e8f2d6a
commit
d05da1fa45
|
@ -271,7 +271,13 @@ static int entropy_gather_internal( mbedtls_entropy_context *ctx )
|
||||||
*/
|
*/
|
||||||
for( i = 0; i < ctx->source_count; i++ )
|
for( i = 0; i < ctx->source_count; i++ )
|
||||||
{
|
{
|
||||||
if( ctx->source[i].strong == MBEDTLS_ENTROPY_SOURCE_STRONG )
|
volatile int strong_fi = ctx->source[i].strong;
|
||||||
|
if( strong_fi == MBEDTLS_ENTROPY_SOURCE_STRONG )
|
||||||
|
have_one_strong_fi = 1;
|
||||||
|
|
||||||
|
mbedtls_platform_enforce_volatile_reads();
|
||||||
|
|
||||||
|
if( strong_fi == MBEDTLS_ENTROPY_SOURCE_STRONG )
|
||||||
have_one_strong_fi = 1;
|
have_one_strong_fi = 1;
|
||||||
|
|
||||||
olen = 0;
|
olen = 0;
|
||||||
|
|
Loading…
Reference in a new issue