From c27fa01c59dc4a83b58adda23291f6fc2a464877 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 29 Jan 2016 17:57:03 -0500 Subject: Guard use of X9.31 RNG in macro check --- src/cli/speed.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index 28501f0c0..ed39827e5 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -363,15 +363,17 @@ class Speed final : public Command #endif else if(algo == "RNG") { + Botan::AutoSeeded_RNG auto_rng; + bench_rng(auto_rng, "AutoSeeded_RNG (periodic reseed)", msec, buf_size); + #if defined(BOTAN_HAS_SYSTEM_RNG) bench_rng(Botan::system_rng(), "System_RNG", msec, buf_size); #endif - Botan::AutoSeeded_RNG auto_rng; - bench_rng(auto_rng, "AutoSeeded_RNG (periodic reseed)", msec, buf_size); - +#if defined(BOTAN_HAS_X931_RNG) Botan::ANSI_X931_RNG x931_rng(Botan::BlockCipher::create("AES-256").release(), new Botan::AutoSeeded_RNG); bench_rng(x931_rng, x931_rng.name(), msec, buf_size); +#endif #if defined(BOTAN_HAS_HMAC_DRBG) for(std::string hash : { "SHA-256", "SHA-384", "SHA-512" }) -- cgit v1.2.3