aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_ffi.cpp19
-rw-r--r--src/tests/unit_tls.cpp2
2 files changed, 20 insertions, 1 deletions
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
index abc069c97..c196cf5c4 100644
--- a/src/tests/test_ffi.cpp
+++ b/src/tests/test_ffi.cpp
@@ -387,11 +387,26 @@ class FFI_Unit_Tests : public Test
std::vector<Test::Result> results;
results.push_back(ffi_test_mp(rng));
+
+#if defined(BOTAN_HAS_RSA)
results.push_back(ffi_test_rsa(rng));
+#endif
+
+#if defined(BOTAN_HAS_DSA)
results.push_back(ffi_test_dsa(rng));
+#endif
+
+#if defined(BOTAN_HAS_ECDSA)
results.push_back(ffi_test_ecdsa(rng));
+#endif
+
+#if defined(BOTAN_HAS_ECDH)
results.push_back(ffi_test_ecdh(rng));
+#endif
+
+#if defined(BOTAN_HAS_MCELIECE)
results.push_back(ffi_test_mceliece(rng));
+#endif
TEST_FFI_OK(botan_rng_destroy, (rng));
@@ -629,6 +644,7 @@ class FFI_Unit_Tests : public Test
Test::Result result("FFI RSA");
botan_privkey_t priv;
+
if(TEST_FFI_OK(botan_privkey_create_rsa, (&priv, rng, 1024)))
{
TEST_FFI_OK(botan_privkey_check_key, (priv, rng, 0));
@@ -754,6 +770,7 @@ class FFI_Unit_Tests : public Test
Test::Result result("FFI DSA");
botan_privkey_t priv;
+
if(TEST_FFI_OK(botan_privkey_create, (&priv, "DSA", "dsa/jce/1024", rng)))
{
TEST_FFI_OK(botan_privkey_check_key, (priv, rng, 0));
@@ -863,7 +880,7 @@ class FFI_Unit_Tests : public Test
if(TEST_FFI_OK(botan_privkey_create_ecdsa, (&priv, rng, "secp384r1")))
{
botan_pubkey_t pub;
- TEST_FFI_OK(botan_privkey_export_pubkey, (&pub, priv));
+ REQUIRE_FFI_OK(botan_privkey_export_pubkey, (&pub, priv));
ffi_test_pubkey_export(result, pub, priv, rng);
diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp
index 77aebce93..28152e624 100644
--- a/src/tests/unit_tls.cpp
+++ b/src/tests/unit_tls.cpp
@@ -132,6 +132,8 @@ class Credentials_Manager_Test : public Botan::Credentials_Manager
chain.push_back(*m_dsa_ca);
break;
}
+#else
+ BOTAN_UNUSED(context);
#endif
}
}