diff options
author | lloyd <[email protected]> | 2010-03-03 22:04:17 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-03 22:04:17 +0000 |
commit | fc5e9002d53879150e580b0249546fdee405e321 (patch) | |
tree | 7f74e3828dc166b65d7ea21d730c93511a405f10 /checks | |
parent | e44831e3af7be3e1fcd53c0116df0eb27611d3a3 (diff) |
Reduce deps slightly in selftest code
Diffstat (limited to 'checks')
-rw-r--r-- | checks/dolook.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
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 <botan/filters.h> #include <botan/libstate.h> #include <botan/hmac.h> -#include <botan/aes.h> #include <botan/sha2_32.h> #include <botan/sha2_64.h> #include <botan/parsing.h> @@ -36,9 +35,16 @@ #include <botan/hmac_rng.h> #endif +#if defined(BOTAN_HAS_AES) + #include <botan/aes.h> +#endif + +#if defined(BOTAN_HAS_DES) + #include <botan/des.h> +#endif + #if defined(BOTAN_HAS_X931_RNG) #include <botan/x931_rng.h> - #include <botan/des.h> #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)); |