diff options
author | Jack Lloyd <[email protected]> | 2016-12-08 22:39:57 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-08 22:41:39 -0500 |
commit | b9de14fd8ce50064870d57e366ce99720ae9f4b8 (patch) | |
tree | 328bef42ff9a65738a26671db5d8e3ea94e17bb7 /src/extra_tests/fuzzers/jigs/tls_server.cpp | |
parent | 047e3f3cdc2720ba6ce38af2b4911ace9d5de27b (diff) |
Avoid use of system RNG in fuzzers
Seemingly /dev/urandom not accessible in ClusterFuzz env
[ci skip]
Diffstat (limited to 'src/extra_tests/fuzzers/jigs/tls_server.cpp')
-rw-r--r-- | src/extra_tests/fuzzers/jigs/tls_server.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/extra_tests/fuzzers/jigs/tls_server.cpp b/src/extra_tests/fuzzers/jigs/tls_server.cpp index dea885de3..acf7ce08e 100644 --- a/src/extra_tests/fuzzers/jigs/tls_server.cpp +++ b/src/extra_tests/fuzzers/jigs/tls_server.cpp @@ -6,7 +6,6 @@ #include "driver.h" #include <botan/tls_server.h> -#include <botan/system_rng.h> const char* fixed_rsa_key = "-----BEGIN PRIVATE KEY-----\n" @@ -69,7 +68,7 @@ class Fuzzer_TLS_Server_Creds : public Credentials_Manager DataSource_Memory key_in(fixed_rsa_key); m_rsa_cert.reset(new Botan::X509_Certificate(cert_in)); - //m_rsa_key.reset(Botan::PKCS8::load_key(key_in, Botan::system_rng())); + //m_rsa_key.reset(Botan::PKCS8::load_key(key_in, fuzzer_rng()); } std::vector<Botan::X509_Certificate> cert_chain( @@ -119,7 +118,6 @@ void fuzz(const uint8_t in[], size_t len) auto ignore_alerts = [](TLS::Alert, const byte[], size_t) {}; auto ignore_hs = [](const TLS::Session&) { return true; }; - Botan::System_RNG rng; TLS::Session_Manager_Noop session_manager; TLS::Policy policy; TLS::Server_Information info("server.name", 443); @@ -141,7 +139,7 @@ void fuzz(const uint8_t in[], size_t len) session_manager, creds, policy, - rng, + fuzzer_rng(), next_proto_fn, is_datagram); |