diff options
author | Jack Lloyd <[email protected]> | 2019-08-28 19:42:38 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-08-28 19:46:35 -0400 |
commit | baac1a8497533c1f2f0e699cc6ddc5f8b263adfc (patch) | |
tree | 94888713516e151f40b7b13c5a3e6c9db6b24ecd /src | |
parent | 8f6880d3538df40882955f34cfa5612c80b1c6af (diff) |
Don't strictly require auto_rng in tls_proxy
Follow behavior of tls_http_server and use either system or auto_rng
depending on availability.
See #2085
Diffstat (limited to 'src')
-rw-r--r-- | src/cli/tls_proxy.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cli/tls_proxy.cpp b/src/cli/tls_proxy.cpp index aa9e4dca9..ad199eb91 100644 --- a/src/cli/tls_proxy.cpp +++ b/src/cli/tls_proxy.cpp @@ -25,9 +25,14 @@ #include <botan/tls_server.h> #include <botan/x509cert.h> #include <botan/pkcs8.h> -#include <botan/auto_rng.h> #include <botan/hex.h> +#if defined(BOTAN_HAS_SYSTEM_RNG) + #include <botan/system_rng.h> +#else + #include <botan/auto_rng.h> +#endif + #if defined(BOTAN_HAS_TLS_SQLITE3_SESSION_MANAGER) #include <botan/tls_session_manager_sqlite.h> #endif @@ -348,7 +353,11 @@ class tls_proxy_session final : public boost::enable_shared_from_this<tls_proxy_ tcp::socket m_client_socket; tcp::socket m_server_socket; - Botan::AutoSeeded_RNG m_rng; // RNG per connection +#if defined(BOTAN_HAS_SYSTEM_RNG) + Botan::System_RNG m_rng; +#else + Botan::AutoSeeded_RNG m_rng; +#endif Botan::TLS::Server m_tls; std::string m_hostname; |