diff options
author | Jack Lloyd <[email protected]> | 2020-09-12 10:57:01 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2020-09-12 10:57:01 -0400 |
commit | 241e64679c28048f6a5f2d6b8a1d695181f28cf8 (patch) | |
tree | 04cdf96974fcae7e43021daecc59446a73ca777c /src | |
parent | 7df9ca62a040780025005db4b3942c6ef4a10364 (diff) |
Remove use of Serialized_RNG in FFI and tests
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ffi/ffi_rng.cpp | 8 | ||||
-rw-r--r-- | src/tests/tests.cpp | 8 |
2 files changed, 1 insertions, 15 deletions
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<Botan::RandomNumberGenerator> 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()); } |