diff options
Diffstat (limited to 'src/libstate/libstate.cpp')
-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 6aa3c5119..9ac15e381 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -9,8 +9,6 @@ #include <botan/charset.h> #include <botan/engine.h> #include <botan/init.h> -#include <botan/selftest.h> - #include <botan/internal/defalloc.h> #include <botan/internal/default_engine.h> #include <botan/internal/mutex.h> @@ -18,6 +16,10 @@ #include <botan/internal/stl_util.h> #include <algorithm> +#if defined(BOTAN_HAS_SELFTESTS) + #include <botan/selftest.h> +#endif + #if defined(BOTAN_HAS_MUTEX_PTHREAD) #include <botan/internal/mux_pthr.h> #elif defined(BOTAN_HAS_MUTEX_WIN32) @@ -313,8 +315,10 @@ void Library_State::initialize(bool thread_safe) m_algorithm_factory = new Algorithm_Factory(engines, *mutex_factory); +#if defined(BOTAN_HAS_SELFTESTS) if(!passes_self_tests(algorithm_factory())) throw Self_Test_Failure("Startup self tests failed"); +#endif } /* |