mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-28 14:03:29 +01:00
Disable both RDRAND and RDSEED if a failure is detected
This commit is contained in:
parent
5ecff99edc
commit
3565cb1afe
@ -397,6 +397,19 @@ void DetectX86Features()
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
g_hasRDRAND = 0;
|
g_hasRDRAND = 0;
|
||||||
|
g_hasRDSEED = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_hasRDSEED)
|
||||||
|
{
|
||||||
|
if ( RDSEED_getBytes ((unsigned char*) cpuid, sizeof (cpuid))
|
||||||
|
&& (cpuid[0] == 0xFFFFFFFF) && (cpuid[1] == 0xFFFFFFFF)
|
||||||
|
&& (cpuid[2] == 0xFFFFFFFF) && (cpuid[3] == 0xFFFFFFFF)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
g_hasRDRAND = 0;
|
||||||
|
g_hasRDSEED = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user