aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_nr.cpp
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-26 20:20:32 +0200
committerSimon Warta <[email protected]>2015-07-03 10:33:45 +0200
commitf472b8fc61accbbaa6a36af9d2d20b0fde37a1a2 (patch)
tree8e71c24da6f7f5b037024741105ca392369e590a /src/tests/test_nr.cpp
parentcd9037e29f32197b9c37ef7bec955ac2372b543b (diff)
Make Botan compile when only some modules are enabled
Fixes #146.
Diffstat (limited to 'src/tests/test_nr.cpp')
-rw-r--r--src/tests/test_nr.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tests/test_nr.cpp b/src/tests/test_nr.cpp
index 25d84606c..1da12c8c8 100644
--- a/src/tests/test_nr.cpp
+++ b/src/tests/test_nr.cpp
@@ -5,22 +5,20 @@
*/
#include "tests.h"
-#include "test_pubkey.h"
#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
- #include <botan/nr.h>
- #include <botan/pubkey.h>
- #include <botan/dl_group.h>
-#endif
+
+#include "test_pubkey.h"
#include <botan/hex.h>
+#include <botan/nr.h>
+#include <botan/pubkey.h>
+#include <botan/dl_group.h>
#include <iostream>
#include <fstream>
using namespace Botan;
-#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
-
namespace {
size_t nr_sig_kat(const std::string& p,
@@ -51,13 +49,11 @@ size_t nr_sig_kat(const std::string& p,
}
}
-#endif
size_t test_nr()
{
size_t fails = 0;
-#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
std::ifstream nr_sig(PK_TEST_DATA_DIR "/nr.vec");
fails += run_tests_bb(nr_sig, "NR Signature", "Signature", true,
@@ -65,8 +61,12 @@ size_t test_nr()
{
return nr_sig_kat(m["P"], m["Q"], m["G"], m["X"], m["Hash"], m["Msg"], m["Nonce"], m["Signature"]);
});
-#endif
return fails;
}
+#else
+
+SKIP_TEST(nr);
+
+#endif // BOTAN_HAS_NYBERG_RUEPPEL