diff options
author | lloyd <[email protected]> | 2008-09-28 19:20:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 19:20:33 +0000 |
commit | 9822a701516396b7de4e41339faecd48ff8dc8ff (patch) | |
tree | 719574e03e1fc811530150d3d81486fd3e2cecfb /checks/pk.cpp | |
parent | 8534c9a67226ccffe7acbefbf3905aba10e88de3 (diff) |
Allow test suite to build even if RNG or DLIES is missing
Diffstat (limited to 'checks/pk.cpp')
-rw-r--r-- | checks/pk.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp index 7a8f821fa..31c432033 100644 --- a/checks/pk.cpp +++ b/checks/pk.cpp @@ -13,7 +13,10 @@ #include <botan/nr.h> #include <botan/rw.h> #include <botan/elgamal.h> -#include <botan/dlies.h> + +#if defined(BOTAN_HAS_DLIES) + #include <botan/dlies.h> +#endif #include <botan/filters.h> #include <botan/look_pk.h> @@ -460,6 +463,7 @@ u32bit validate_dlies(const std::string& algo, if(str.size() != 6) throw Exception("Invalid input from pk_valid.dat"); +#if defined(BOTAN_HAS_DLIES) DL_Group domain(to_bigint(str[0]), to_bigint(str[1])); DH_PrivateKey from(rng, domain, to_bigint(str[2])); @@ -484,6 +488,9 @@ u32bit validate_dlies(const std::string& algo, bool failure = false; validate_encryption(e, d, algo, str[4], empty, str[5], failure); return (failure ? 1 : 0); +#else + return 0; +#endif } void do_pk_keygen_tests(RandomNumberGenerator& rng) |