aboutsummaryrefslogtreecommitdiff
path: root/crypto/rand/md_rand.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-02-04 15:24:06 +0000
committerMatt Caswell <matt@openssl.org>2016-02-04 23:09:48 +0000
commitd698550fb41c3fd1e5c4c8fc6bed37cd8931467d (patch)
treee78406c633d168b865810dd6d2f9b49f4a5a01df /crypto/rand/md_rand.c
parentc4cbf9b3440adcd3fd2454dccb163552ed7db73a (diff)
downloadopenssl-d698550fb41c3fd1e5c4c8fc6bed37cd8931467d.zip
openssl-d698550fb41c3fd1e5c4c8fc6bed37cd8931467d.tar.gz
openssl-d698550fb41c3fd1e5c4c8fc6bed37cd8931467d.tar.bz2
Don't use RDRAND if told not to
Ensure we respect OPENSSL_NO_RDRAND Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/rand/md_rand.c')
-rw-r--r--crypto/rand/md_rand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c
index 2b8abce..9b6b0b5 100644
--- a/crypto/rand/md_rand.c
+++ b/crypto/rand/md_rand.c
@@ -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