diff options
Diffstat (limited to 'src/Crypto/cpu.c')
-rw-r--r-- | src/Crypto/cpu.c | 13 |
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; } } |