From 241e64679c28048f6a5f2d6b8a1d695181f28cf8 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 12 Sep 2020 10:57:01 -0400 Subject: Remove use of Serialized_RNG in FFI and tests --- src/lib/ffi/ffi_rng.cpp | 8 +------- src/tests/tests.cpp | 8 -------- 2 files changed, 1 insertion(+), 15 deletions(-) (limited to 'src') diff --git a/src/lib/ffi/ffi_rng.cpp b/src/lib/ffi/ffi_rng.cpp index c32894ff9..617723cdd 100644 --- a/src/lib/ffi/ffi_rng.cpp +++ b/src/lib/ffi/ffi_rng.cpp @@ -32,7 +32,7 @@ int botan_rng_init(botan_rng_t* rng_out, const char* rng_type) { rng.reset(new Botan::System_RNG); } - else if(rng_type_s == "user") + else if(rng_type_s == "user" || rng_type_s == "user-threadsafe") { rng.reset(new Botan::AutoSeeded_RNG); } @@ -46,12 +46,6 @@ int botan_rng_init(botan_rng_t* rng_out, const char* rng_type) rng.reset(new Botan::Processor_RNG); } #endif -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - else if(rng_type_s == "user-threadsafe") - { - rng.reset(new Botan::Serialized_RNG(new Botan::AutoSeeded_RNG)); - } -#endif if(!rng) { diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 1af350559..3eb66214e 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -595,14 +595,6 @@ void Test::set_test_options(const Test_Options& opts) //static void Test::set_test_rng(std::unique_ptr rng) { -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - if(m_opts.test_threads() != 1) - { - m_test_rng.reset(new Botan::Serialized_RNG(rng.release())); - return; - } -#endif - m_test_rng.reset(rng.release()); } -- cgit v1.2.3