aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-22 04:50:11 +0000
committerlloyd <[email protected]>2009-12-22 04:50:11 +0000
commitc2c896ee870285b836f80b30a042941b03ddd440 (patch)
tree59c10c1457a4d525d51a9ea29d747a32adbdcfb9 /src/libstate
parente011c31441900612d7d15a43fe709c2efacb526d (diff)
Don't require selftest in libstate; macro wrap
Diffstat (limited to 'src/libstate')
-rw-r--r--src/libstate/libstate.cpp8
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
}
/*