aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-24 19:39:06 -0500
committerJack Lloyd <[email protected]>2017-01-24 19:39:06 -0500
commit885c96251e931909f783c1bc3fefd9f7663e47d9 (patch)
tree84c89a87c590d58acfe1228d2b2715bf2420aff1
parent53d69ce19b02051cbf732af00ab98bcf384561cd (diff)
Fix PKCS11 tests when ECDH or ECDSA was disabled
It assumed if ECC was included then ECDH and ECDSA was also
-rw-r--r--src/tests/test_pkcs11_high_level.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp
index e66201d2b..5ff092a74 100644
--- a/src/tests/test_pkcs11_high_level.cpp
+++ b/src/tests/test_pkcs11_high_level.cpp
@@ -34,28 +34,25 @@
#include <botan/pubkey.h>
#endif
-#if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_PKCS11)
+#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) && defined(BOTAN_HAS_PKCS11)
- #include <botan/ecc_key.h>
+#if defined(BOTAN_HAS_ECDSA) && defined(BOTAN_HAS_PKCS11)
#include <botan/ecdsa.h>
+ #include <botan/p11_ecdsa.h>
+#endif
+
+#if defined(BOTAN_HAS_ECDH) && defined(BOTAN_HAS_PKCS11)
#include <botan/ecdh.h>
- #include <botan/p11_ecc_key.h>
#include <botan/p11_ecdh.h>
- #include <botan/p11_ecdsa.h>
#endif
#if defined(BOTAN_HAS_X509_CERTIFICATES) && defined(BOTAN_HAS_PKCS11)
#include <botan/p11_x509.h>
#endif
-#if defined(BOTAN_HAS_AUTO_SEEDING_RNG)
- #include <botan/auto_rng.h>
-#endif
-
#if defined(BOTAN_HAS_HMAC_DRBG)
#include <botan/hmac_drbg.h>
#endif
@@ -909,7 +906,7 @@ BOTAN_REGISTER_TEST("pkcs11-rsa", PKCS11_RSA_Tests);
/***************************** PKCS11 ECDSA *****************************/
-#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO)
+#if defined(BOTAN_HAS_ECDSA)
Test::Result test_ecdsa_privkey_import()
{
@@ -1149,6 +1146,10 @@ class PKCS11_ECDSA_Tests : public PKCS11_Test
BOTAN_REGISTER_TEST("pkcs11-ecdsa", PKCS11_ECDSA_Tests);
+#endif
+
+#if defined(BOTAN_HAS_ECDH)
+
/***************************** PKCS11 ECDH *****************************/
Test::Result test_ecdh_privkey_import()