aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-01-29 17:57:03 -0500
committerJack Lloyd <[email protected]>2016-01-29 17:57:03 -0500
commitc27fa01c59dc4a83b58adda23291f6fc2a464877 (patch)
tree7a0504f829db6c4afece59d93d88432e478e57c9 /src/cli
parente0997796f92c863f3b3b31464dc9530957e06d02 (diff)
Guard use of X9.31 RNG in macro check
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/speed.cpp8
1 files 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" })