diff options
author | lloyd <[email protected]> | 2014-02-09 16:52:51 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-02-09 16:52:51 +0000 |
commit | 4f3b0ce8fccd879791d5a701102ee0737f3509b1 (patch) | |
tree | 37ab6f550154de465d2677fdab1cc1d96904fa5c /src/tests/test_dlies.cpp | |
parent | 253aa701ffa654af3c880e1e1b4965fabf86be3b (diff) |
More fixes for minified builds
Diffstat (limited to 'src/tests/test_dlies.cpp')
-rw-r--r-- | src/tests/test_dlies.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/tests/test_dlies.cpp b/src/tests/test_dlies.cpp index 05fdb863f..d1816bf98 100644 --- a/src/tests/test_dlies.cpp +++ b/src/tests/test_dlies.cpp @@ -1,17 +1,21 @@ #include "tests.h" #include "test_pubkey.h" -#include <botan/auto_rng.h> -#include <botan/pubkey.h> -#include <botan/lookup.h> -#include <botan/dlies.h> -#include <botan/dh.h> #include <botan/hex.h> #include <iostream> #include <fstream> +#if defined(BOTAN_HAS_DLIES) + #include <botan/auto_rng.h> + #include <botan/pubkey.h> + #include <botan/lookup.h> + #include <botan/dlies.h> + #include <botan/dh.h> +#endif + using namespace Botan; +#if defined(BOTAN_HAS_DLIES) namespace { size_t dlies_kat(const std::string& p, @@ -59,18 +63,21 @@ size_t dlies_kat(const std::string& p, } } +#endif size_t test_dlies() { - std::ifstream dlies(PK_TEST_DATA_DIR "/dlies.vec"); - size_t fails = 0; +#if defined(BOTAN_HAS_DLIES) + std::ifstream dlies(PK_TEST_DATA_DIR "/dlies.vec"); + fails += run_tests_bb(dlies, "DLIES Encryption", "Ciphertext", true, [](std::map<std::string, std::string> m) -> size_t { return dlies_kat(m["P"], m["G"], m["X1"], m["X2"], m["Msg"], m["Ciphertext"]); }); +#endif return fails; } |