From 36d5410d18784270e10d6cc63c3b64885f4909c6 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 13 Nov 2008 01:28:28 +0000 Subject: Only create RNG if needed in test app --- checks/check.cpp | 10 +++++----- 1 file 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=: Pass 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); } -- cgit v1.2.3