summaryrefslogtreecommitdiff
path: root/rdrand.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-12-28 12:45:34 -0500
committerJeffrey Walton <noloader@gmail.com>2018-12-28 12:45:34 -0500
commitd2cf296d2aab20b7dc6faf802ca7583a01224dd8 (patch)
tree10e449e5fc4ead21824f0860be862601ec82f5d7 /rdrand.cpp
parent29d1c1772d05c7ae379fb728b8d9e9e44be80759 (diff)
downloadcryptopp-git-d2cf296d2aab20b7dc6faf802ca7583a01224dd8.tar.gz
Fix missing RDRAND and RDSEED GenerateBlock functions when CRYPTOPP_DISABLE_ASM
Also see https://github.com/noloader/cryptopp-cmake/issues/44
Diffstat (limited to 'rdrand.cpp')
-rw-r--r--rdrand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/rdrand.cpp b/rdrand.cpp
index 15afcd93..8175d7ac 100644
--- a/rdrand.cpp
+++ b/rdrand.cpp
@@ -24,7 +24,7 @@
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
-#if defined(CRYPTOPP_CPUID_AVAILABLE)
+#if defined(CRYPTOPP_CPUID_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
# if defined(CRYPTOPP_MSC_VERSION)
# define MASM_RDRAND_ASM_AVAILABLE 1
@@ -54,7 +54,7 @@ extern "C" void CRYPTOPP_FASTCALL MASM_RDSEED_GenerateBlock(byte*, size_t);
NAMESPACE_BEGIN(CryptoPP)
-#if defined(CRYPTOPP_CPUID_AVAILABLE)
+#if defined(CRYPTOPP_CPUID_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
// Fills 4 bytes
inline void RDRAND32(void* output)