aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_rw.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-02-09 16:52:51 +0000
committerlloyd <[email protected]>2014-02-09 16:52:51 +0000
commit4f3b0ce8fccd879791d5a701102ee0737f3509b1 (patch)
tree37ab6f550154de465d2677fdab1cc1d96904fa5c /src/tests/test_rw.cpp
parent253aa701ffa654af3c880e1e1b4965fabf86be3b (diff)
More fixes for minified builds
Diffstat (limited to 'src/tests/test_rw.cpp')
-rw-r--r--src/tests/test_rw.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/tests/test_rw.cpp b/src/tests/test_rw.cpp
index 4d3bc2d5b..09e746add 100644
--- a/src/tests/test_rw.cpp
+++ b/src/tests/test_rw.cpp
@@ -1,15 +1,19 @@
#include "tests.h"
#include "test_pubkey.h"
-#include <botan/auto_rng.h>
-#include <botan/pubkey.h>
-#include <botan/rw.h>
#include <botan/hex.h>
#include <iostream>
#include <fstream>
+#if defined(BOTAN_HAS_RW)
+ #include <botan/auto_rng.h>
+ #include <botan/pubkey.h>
+ #include <botan/rw.h>
+#endif
+
using namespace Botan;
+#if defined(BOTAN_HAS_RW)
namespace {
const std::string padding = "EMSA2(SHA-1)";
@@ -52,14 +56,16 @@ 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");
- size_t fails = 0;
-
fails += run_tests_bb(rw_sig, "RW Signature", "Signature", true,
[](std::map<std::string, std::string> m) -> size_t
{
@@ -71,6 +77,7 @@ size_t test_rw()
{
return rw_sig_verify(m["E"], m["N"], m["Msg"], m["Signature"]);
});
+#endif
return fails;
}