aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-13 12:04:11 +0000
committerlloyd <[email protected]>2009-10-13 12:04:11 +0000
commit88e03041c4c8a33a7fc3311cfca5fc398294ff08 (patch)
tree5a93d1610881169fb5b90965329fce483e4bcb1e /src/rng
parent0cdb1990f78a19c62c3521cce0dd6a2e3460a190 (diff)
Don't make auto_rng require AES; using it is optional as long as HMAC_RNG
is being used and not Randpool.
Diffstat (limited to 'src/rng')
-rw-r--r--src/rng/auto_rng/auto_rng.cpp9
-rw-r--r--src/rng/auto_rng/info.txt1
2 files changed, 6 insertions, 4 deletions
diff --git a/src/rng/auto_rng/auto_rng.cpp b/src/rng/auto_rng/auto_rng.cpp
index 171c83cca..8405170ad 100644
--- a/src/rng/auto_rng/auto_rng.cpp
+++ b/src/rng/auto_rng/auto_rng.cpp
@@ -11,7 +11,6 @@
#include <botan/hmac.h>
#include <botan/sha2_32.h>
#include <botan/sha2_64.h>
-#include <botan/aes.h>
#if defined(BOTAN_HAS_RANDPOOL)
#include <botan/randpool.h>
@@ -25,6 +24,10 @@
#include <botan/x931_rng.h>
#endif
+#if defined(BOTAN_HAS_AES)
+ #include <botan/aes.h>
+#endif
+
#if defined(BOTAN_HAS_TIMER_HARDWARE)
#include <botan/tm_hard.h>
#endif
@@ -135,7 +138,7 @@ AutoSeeded_RNG::AutoSeeded_RNG(u32bit poll_bits)
#if defined(BOTAN_HAS_HMAC_RNG)
rng = new HMAC_RNG(new HMAC(new SHA_512), new HMAC(new SHA_256));
-#elif defined(BOTAN_HAS_RANDPOOL)
+#elif defined(BOTAN_HAS_RANDPOOL) && defined(BOTAN_HAS_AES)
rng = new Randpool(new AES_256, new HMAC(new SHA_256));
#endif
@@ -143,7 +146,7 @@ AutoSeeded_RNG::AutoSeeded_RNG(u32bit poll_bits)
throw Algorithm_Not_Found("No usable RNG found enabled in build");
/* If X9.31 is available, use it to wrap the other RNG as a failsafe */
-#if defined(BOTAN_HAS_X931_RNG)
+#if defined(BOTAN_HAS_X931_RNG) && defined(BOTAN_HAS_AES)
rng = new ANSI_X931_RNG(new AES_256, rng);
#endif
diff --git a/src/rng/auto_rng/info.txt b/src/rng/auto_rng/info.txt
index 2f41bc068..7d5d5ddcc 100644
--- a/src/rng/auto_rng/info.txt
+++ b/src/rng/auto_rng/info.txt
@@ -10,7 +10,6 @@ auto_rng.cpp
</add>
<requires>
-aes
hmac
sha2
timer