diff options
Diffstat (limited to 'src/libstate')
-rw-r--r-- | src/libstate/libstate.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index 4fdf1cd30..4dc78ade2 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -7,13 +7,15 @@ #include <botan/libstate.h> #include <botan/init.h> -#include <botan/selftest.h> - #include <botan/internal/defalloc.h> #include <botan/internal/default_engine.h> #include <botan/internal/stl_util.h> #include <algorithm> +#if defined(BOTAN_HAS_SELFTESTS) + #include <botan/selftest.h> +#endif + #if defined(BOTAN_HAS_ALLOC_MMAP) #include <botan/internal/mmap_mem.h> #endif @@ -273,8 +275,10 @@ void Library_State::initialize() m_algorithm_factory = new Algorithm_Factory(engines); +#if defined(BOTAN_HAS_SELFTESTS) if(!passes_self_tests(algorithm_factory())) throw Self_Test_Failure("Startup self tests failed"); +#endif } /* |