Don't use RDRAND if told not to

Ensure we respect OPENSSL_NO_RDRAND

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell 2016-02-04 15:24:06 +00:00
parent c4cbf9b344
commit d698550fb4

View File

@ -686,7 +686,8 @@ static int rand_status(void)
#if (defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64) || defined(__x86_64__) || \
defined(_M_AMD64) || defined (_M_X64)) && defined(OPENSSL_CPUID_OBJ)
defined(_M_AMD64) || defined (_M_X64)) && defined(OPENSSL_CPUID_OBJ) \
&& !defined(OPENSSL_NO_RDRAND)
# define RDRAND_CALLS 4