diff options
author | Jack Lloyd <[email protected]> | 2015-12-27 00:22:14 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-27 00:22:14 -0500 |
commit | d27416e791c9aed684efe0d6071fe66a43cf7af0 (patch) | |
tree | 8da077c7ac4a0b4d7c368e63591716d4b665f224 /src/cli/tls_server.cpp | |
parent | b36cb4b4ab944f91fbf34d730806fc74640cd2f8 (diff) |
Add Command::rng()
for when a command wants an RNG but doesn't much care what kind.
This adds a place where a future --rng-type= option can be consulted
to eg use the system RNG or a user seeded DRBG.
Diffstat (limited to 'src/cli/tls_server.cpp')
-rw-r--r-- | src/cli/tls_server.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cli/tls_server.cpp b/src/cli/tls_server.cpp index f6a3a311e..f83f008f7 100644 --- a/src/cli/tls_server.cpp +++ b/src/cli/tls_server.cpp @@ -11,7 +11,6 @@ #include <botan/tls_server.h> #include <botan/hex.h> -#include <botan/auto_rng.h> #include "credentials.h" #include <list> @@ -48,13 +47,11 @@ class TLS_Server : public Command const bool is_tcp = (transport == "tcp"); - Botan::AutoSeeded_RNG rng; - Botan::TLS::Policy policy; // TODO read policy from file - Botan::TLS::Session_Manager_In_Memory session_manager(rng); // TODO sqlite3 + Botan::TLS::Session_Manager_In_Memory session_manager(rng()); // TODO sqlite3 - Basic_Credentials_Manager creds(rng, server_crt, server_key); + Basic_Credentials_Manager creds(rng(), server_crt, server_key); auto protocol_chooser = [](const std::vector<std::string>& protocols) -> std::string { for(size_t i = 0; i != protocols.size(); ++i) @@ -116,7 +113,7 @@ class TLS_Server : public Command session_manager, creds, policy, - rng, + rng(), protocol_chooser, !is_tcp); |