aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/test_ffi.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
index 243583e8f..3e272d9cb 100644
--- a/src/tests/test_ffi.cpp
+++ b/src/tests/test_ffi.cpp
@@ -79,10 +79,17 @@ class FFI_Unit_Tests : public Test
TEST_FFI_OK(botan_rng_destroy, (rng));
}
- TEST_FFI_OK(botan_rng_init, (&rng, "user"));
- TEST_FFI_OK(botan_rng_get, (rng, outbuf.data(), outbuf.size()));
- TEST_FFI_OK(botan_rng_reseed, (rng, 256));
- // used for the rest of this function and destroyed at the end
+ if(TEST_FFI_OK(botan_rng_init, (&rng, "user")))
+ {
+ TEST_FFI_OK(botan_rng_get, (rng, outbuf.data(), outbuf.size()));
+ TEST_FFI_OK(botan_rng_reseed, (rng, 256));
+ // used for the rest of this function and destroyed at the end
+ }
+ else
+ {
+ result.test_note("Existing early due to missing FFI RNG");
+ return {result};
+ }
// hashing test
botan_hash_t hash;