diff options
author | lloyd <[email protected]> | 2008-09-28 22:56:05 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 22:56:05 +0000 |
commit | 499ec262fc895d68b7c98e534e99d908b63577b3 (patch) | |
tree | a08a6aa4967d90c4ce85f0849c378bba805bc07e | |
parent | 443ed32a366bbc01cc09b352020f01e08d580565 (diff) |
Move startup selftest into module
-rw-r--r-- | src/libstate.cpp | 7 | ||||
-rw-r--r-- | src/selftest/selftest.cpp (renamed from src/selftest.cpp) | 0 | ||||
-rw-r--r-- | src/selftest/selftest.h (renamed from include/selftest.h) | 0 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/libstate.cpp b/src/libstate.cpp index 9fb2b186a..141e0d1ec 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -9,10 +9,13 @@ #include <botan/stl_util.h> #include <botan/mutex.h> #include <botan/charset.h> -#include <botan/selftest.h> #include <botan/lookup.h> #include <algorithm> +#if defined(BOTAN_HAS_SELFTEST) + #include <botan/selftest.h> +#endif + namespace Botan { /************************************************* @@ -248,11 +251,13 @@ void Library_State::initialize(const InitializerOptions& args, for(u32bit j = 0; j != mod_engines.size(); ++j) engines.push_back(mod_engines[j]); +#if defined(BOTAN_HAS_SELFTEST) if(args.fips_mode() || args.self_test()) { if(!passes_self_tests()) throw Self_Test_Failure("Initialization self-tests"); } +#endif } /************************************************* diff --git a/src/selftest.cpp b/src/selftest/selftest.cpp index ca7000db8..ca7000db8 100644 --- a/src/selftest.cpp +++ b/src/selftest/selftest.cpp diff --git a/include/selftest.h b/src/selftest/selftest.h index ff011a32c..ff011a32c 100644 --- a/include/selftest.h +++ b/src/selftest/selftest.h |