aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/unit_x509.cpp
diff options
context:
space:
mode:
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