aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_dh.cpp
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-07-03 10:34:06 +0200
committerSimon Warta <[email protected]>2015-07-03 10:34:06 +0200
commit56d07f092b170bfdf4972414b0739664c8d6294a (patch)
tree8e71c24da6f7f5b037024741105ca392369e590a /src/tests/test_dh.cpp
parentcd9037e29f32197b9c37ef7bec955ac2372b543b (diff)
parentf472b8fc61accbbaa6a36af9d2d20b0fde37a1a2 (diff)
Merge pull request #148 from webmaster128/fpefe1-only
Make Botan compile if only some modules are enabled
Diffstat (limited to 'src/tests/test_dh.cpp')
-rw-r--r--src/tests/test_dh.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tests/test_dh.cpp b/src/tests/test_dh.cpp
index afafd222a..a546006a5 100644
--- a/src/tests/test_dh.cpp
+++ b/src/tests/test_dh.cpp
@@ -5,10 +5,11 @@
*/
#include "tests.h"
-#include "test_pubkey.h"
#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
+#include "test_pubkey.h"
+
#include <botan/pubkey.h>
#include <botan/dh.h>
#include <botan/hex.h>
@@ -49,13 +50,11 @@ size_t dh_sig_kat(const std::string& p,
}
}
-#endif
size_t test_dh()
{
size_t fails = 0;
-#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
std::ifstream dh_sig(PK_TEST_DATA_DIR "/dh.vec");
fails += run_tests_bb(dh_sig, "DH Kex", "K", true,
@@ -63,8 +62,12 @@ size_t test_dh()
{
return dh_sig_kat(m["P"], m["G"], m["X"], m["Y"], m["KDF"], m["OutLen"], m["K"]);
});
-#endif
return fails;
}
+#else
+
+SKIP_TEST(dh);
+
+#endif // BOTAN_HAS_DIFFIE_HELLMAN