VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/Crypto')
-rw-r--r--src/Crypto/cpu.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Crypto/cpu.c b/src/Crypto/cpu.c
index 33a9815e..78cc715a 100644
--- a/src/Crypto/cpu.c
+++ b/src/Crypto/cpu.c
@@ -397,6 +397,19 @@ void DetectX86Features()
)
{
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;
}
}