aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-07-28 14:11:16 +0000
committerlloyd <[email protected]>2006-07-28 14:11:16 +0000
commit2b4733d5893f0301b15f987c3309befc88eeb768 (patch)
tree8594a8f7d9b340906d6cdd75c06ed9587a511878
parentb617d283d67c3ee0e05c094e55696dbbd72038e3 (diff)
Add a "selftest" option that allows the user to disable startup selftests
-rw-r--r--include/init.h1
-rw-r--r--src/init_opt.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/init.h b/include/init.h
index d98537231..1f8c3d742 100644
--- a/include/init.h
+++ b/include/init.h
@@ -22,6 +22,7 @@ class InitializerOptions
bool seed_rng() const;
bool secure_memory() const;
bool fips_mode() const;
+ bool self_test() const;
std::string config_file() const;
diff --git a/src/init_opt.cpp b/src/init_opt.cpp
index 0494976d6..5ba05187d 100644
--- a/src/init_opt.cpp
+++ b/src/init_opt.cpp
@@ -78,6 +78,14 @@ bool InitializerOptions::fips_mode() const
}
/*************************************************
+* Check if startup self tests were requested *
+*************************************************/
+bool InitializerOptions::self_test() const
+ {
+ return boolean_arg(args, "selftest", true);
+ }
+
+/*************************************************
* Return the config file to load, if any *
*************************************************/
std::string InitializerOptions::config_file() const