From fc5e9002d53879150e580b0249546fdee405e321 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 3 Mar 2010 22:04:17 +0000 Subject: Reduce deps slightly in selftest code --- checks/dolook.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'checks') diff --git a/checks/dolook.cpp b/checks/dolook.cpp index aa2d58e1f..e9be25614 100644 --- a/checks/dolook.cpp +++ b/checks/dolook.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,16 @@ #include #endif +#if defined(BOTAN_HAS_AES) + #include +#endif + +#if defined(BOTAN_HAS_DES) + #include +#endif + #if defined(BOTAN_HAS_X931_RNG) #include - #include #endif #if defined(BOTAN_HAS_AUTO_SEEDING_RNG) @@ -156,10 +162,15 @@ Filter* lookup_rng(const std::string& algname, #endif #if defined(BOTAN_HAS_X931_RNG) + +#if defined(BOTAN_HAS_DES) if(algname == "X9.31-RNG(TripleDES)") prng = new ANSI_X931_RNG(new TripleDES, new Fixed_Output_RNG(decode_hex(key))); - else if(algname == "X9.31-RNG(AES-128)") +#endif + +#if defined(BOTAN_HAS_AES) + if(algname == "X9.31-RNG(AES-128)") prng = new ANSI_X931_RNG(new AES_128, new Fixed_Output_RNG(decode_hex(key))); else if(algname == "X9.31-RNG(AES-192)") @@ -170,7 +181,9 @@ Filter* lookup_rng(const std::string& algname, new Fixed_Output_RNG(decode_hex(key))); #endif -#if defined(BOTAN_HAS_RANDPOOL) +#endif + +#if defined(BOTAN_HAS_RANDPOOL) && defined(BOTAN_HAS_AES) if(algname == "Randpool") { prng = new Randpool(new AES_256, new HMAC(new SHA_256)); -- cgit v1.2.3