diff options
author | Simon Warta <[email protected]> | 2015-06-26 20:20:32 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-07-03 10:33:45 +0200 |
commit | f472b8fc61accbbaa6a36af9d2d20b0fde37a1a2 (patch) | |
tree | 8e71c24da6f7f5b037024741105ca392369e590a /src/tests/test_rw.cpp | |
parent | cd9037e29f32197b9c37ef7bec955ac2372b543b (diff) |
Make Botan compile when only some modules are enabled
Fixes #146.
Diffstat (limited to 'src/tests/test_rw.cpp')
-rw-r--r-- | src/tests/test_rw.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tests/test_rw.cpp b/src/tests/test_rw.cpp index f5a4f8cdb..431b070b2 100644 --- a/src/tests/test_rw.cpp +++ b/src/tests/test_rw.cpp @@ -5,21 +5,19 @@ */ #include "tests.h" + +#if defined(BOTAN_HAS_RW) + #include "test_pubkey.h" #include <botan/hex.h> #include <iostream> #include <fstream> - -#if defined(BOTAN_HAS_RW) - - #include <botan/pubkey.h> - #include <botan/rw.h> -#endif +#include <botan/pubkey.h> +#include <botan/rw.h> using namespace Botan; -#if defined(BOTAN_HAS_RW) namespace { const std::string padding = "EMSA2(SHA-1)"; @@ -60,13 +58,11 @@ size_t rw_sig_verify(const std::string& e, } } -#endif size_t test_rw() { size_t fails = 0; -#if defined(BOTAN_HAS_RW) std::ifstream rw_sig(PK_TEST_DATA_DIR "/rw_sig.vec"); std::ifstream rw_verify(PK_TEST_DATA_DIR "/rw_verify.vec"); @@ -81,8 +77,12 @@ size_t test_rw() { return rw_sig_verify(m["E"], m["N"], m["Msg"], m["Signature"]); }); -#endif return fails; } +#else + +SKIP_TEST(rw); + +#endif // BOTAN_HAS_RW |