aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/unit_x509.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/unit_x509.cpp
parentcd9037e29f32197b9c37ef7bec955ac2372b543b (diff)
Make Botan compile when only some modules are enabled
Fixes #146.
Diffstat (limited to 'src/tests/unit_x509.cpp')
-rw-r--r--src/tests/unit_x509.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/tests/unit_x509.cpp b/src/tests/unit_x509.cpp
index 2388dc920..8776305e3 100644
--- a/src/tests/unit_x509.cpp
+++ b/src/tests/unit_x509.cpp
@@ -6,7 +6,15 @@
#include "tests.h"
+#if defined(BOTAN_HAS_X509_CERTIFICATES)
+
+#if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_DSA)
+
#include <botan/filters.h>
+#include <botan/x509self.h>
+#include <botan/x509path.h>
+#include <botan/x509_ca.h>
+#include <botan/pkcs10.h>
#if defined(BOTAN_HAS_RSA)
@@ -21,23 +29,11 @@
#include <botan/ecdsa.h>
#endif
-#if defined(BOTAN_HAS_X509_CERTIFICATES)
- #include <botan/x509self.h>
- #include <botan/x509path.h>
- #include <botan/x509_ca.h>
- #include <botan/pkcs10.h>
-#endif
-
using namespace Botan;
#include <iostream>
#include <memory>
-
-#if defined(BOTAN_HAS_X509_CERTIFICATES) && \
- defined(BOTAN_HAS_RSA) && \
- defined(BOTAN_HAS_DSA)
-
namespace {
u64bit key_id(const Public_Key* key)
@@ -251,7 +247,12 @@ size_t test_x509()
#else
-size_t test_x509() { return 0; }
+UNTESTED_WARNING(x509);
-#endif
+#endif // BOTAN_HAS_RSA && BOTAN_HAS_DSA
+
+#else
+
+SKIP_TEST(x509);
+#endif // BOTAN_HAS_X509_CERTIFICATES