diff options
author | lloyd <[email protected]> | 2008-11-13 01:28:28 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-13 01:28:28 +0000 |
commit | 36d5410d18784270e10d6cc63c3b64885f4909c6 (patch) | |
tree | f23a5dd0efc59aa9789787e61e96af603db93993 /checks/check.cpp | |
parent | eaa23a0cefa65e8d90816b1827822337f95743d0 (diff) |
Only create RNG if needed in test app
Diffstat (limited to 'checks/check.cpp')
-rw-r--r-- | checks/check.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/checks/check.cpp b/checks/check.cpp index 5cf5c1c31..15971b2c7 100644 --- a/checks/check.cpp +++ b/checks/check.cpp @@ -102,10 +102,6 @@ int main(int argc, char* argv[]) Botan::LibraryInitializer init("thread_safe=no"); - //Botan::global_state().algorithm_factory().set_preferred_provider("SHA-160", "core"); - - Botan::AutoSeeded_RNG rng; - if(opts.is_set("help") || argc <= 1) { std::cerr << "Test driver for " @@ -119,8 +115,12 @@ int main(int argc, char* argv[]) << " --seconds=n: Benchmark for n seconds\n" << " --init=<str>: Pass <str> to the library\n" << " --help: Print this message\n"; + return 1; } - else if(opts.is_set("validate") || opts.is_set("test")) + + Botan::AutoSeeded_RNG rng; + + if(opts.is_set("validate") || opts.is_set("test")) { run_test_suite(rng); } |