aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/init_def.cpp7
-rw-r--r--src/libstate.cpp7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/init_def.cpp b/src/init_def.cpp
index abfbe646e..f77b65453 100644
--- a/src/init_def.cpp
+++ b/src/init_def.cpp
@@ -6,7 +6,6 @@
#include <botan/init.h>
#include <botan/libstate.h>
#include <botan/modules.h>
-#include <botan/fips140.h>
namespace Botan {
@@ -21,12 +20,6 @@ void LibraryInitializer::initialize(const InitializerOptions& args,
set_global_state(new Library_State);
global_state().initialize(args, modules);
-
- if(args.fips_mode() || args.self_test())
- {
- if(!FIPS140::passes_self_tests())
- throw Self_Test_Failure("FIPS-140 startup tests");
- }
}
catch(...)
{
diff --git a/src/libstate.cpp b/src/libstate.cpp
index 04a5760cb..9dda38b1f 100644
--- a/src/libstate.cpp
+++ b/src/libstate.cpp
@@ -13,6 +13,7 @@
#include <botan/timers.h>
#include <botan/charset.h>
#include <botan/x931_rng.h>
+#include <botan/fips140.h>
#include <algorithm>
namespace Botan {
@@ -378,6 +379,12 @@ void Library_State::initialize(const InitializerOptions& args,
if(!rng_is_seeded())
throw PRNG_Unseeded("Unable to collect sufficient entropy");
}
+
+ if(args.fips_mode() || args.self_test())
+ {
+ if(!FIPS140::passes_self_tests())
+ throw Self_Test_Failure("FIPS-140 startup tests");
+ }
}
/*************************************************