aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-06-28 17:03:07 +0200
committerDaniel Neus <[email protected]>2016-06-28 17:03:07 +0200
commitb85d5831364495af8bed5ec709f22c489159ebc0 (patch)
treee882c61afb382fc06c82f2184960e086fc1e06cc
parent2ea6f9b1963795dad74489b41bc7d37f897d7a21 (diff)
fix build with disabled pkcs11 module
-rw-r--r--src/tests/test_pkcs11.cpp5
-rw-r--r--src/tests/test_pkcs11_high_level.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/tests/test_pkcs11.cpp b/src/tests/test_pkcs11.cpp
index 676e3f21a..85110cabf 100644
--- a/src/tests/test_pkcs11.cpp
+++ b/src/tests/test_pkcs11.cpp
@@ -7,6 +7,9 @@
#include "test_pkcs11.h"
namespace Botan_Tests {
+
+#if defined(BOTAN_HAS_PKCS11)
+
using namespace Botan;
using namespace PKCS11;
@@ -39,4 +42,6 @@ std::vector<Test::Result> PKCS11_Test::run_pkcs11_tests(const std::string& name,
return results;
}
+#endif
+
}
diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp
index f68203496..1fe2e6883 100644
--- a/src/tests/test_pkcs11_high_level.cpp
+++ b/src/tests/test_pkcs11_high_level.cpp
@@ -29,12 +29,12 @@
#include <botan/der_enc.h>
#include <botan/pubkey.h>
-#if defined(BOTAN_HAS_RSA)
+#if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_PKCS11)
#include <botan/rsa.h>
#include <botan/p11_rsa.h>
#endif
-#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO)
+#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO) && defined(BOTAN_HAS_PKCS11)
#include <botan/ecc_key.h>
#include <botan/ecdsa.h>
#include <botan/ecdh.h>
@@ -43,7 +43,7 @@
#include <botan/p11_ecdsa.h>
#endif
-#if defined(BOTAN_HAS_X509_CERTIFICATES)
+#if defined(BOTAN_HAS_X509_CERTIFICATES) && defined(BOTAN_HAS_PKCS11)
#include <botan/p11_x509.h>
#endif