aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_server.cpp
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2016-05-16 23:02:58 +0200
committerMatthias Gierlings <[email protected]>2016-06-19 18:28:38 +0200
commit490d538512b7f732268358b3a3a6fcbfd2bb67c6 (patch)
tree200ef15842e924860c33f79d3c8be9c76e47ea39 /src/lib/tls/tls_server.cpp
parent93df95db45fa126725808fbd53aa978b00cf08ad (diff)
Compatibility patch for TLS::Callback interface
- Added legacy constructor support for TLS::Channel, TLS::Client, TLS::Server.
Diffstat (limited to 'src/lib/tls/tls_server.cpp')
-rw-r--r--src/lib/tls/tls_server.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/tls/tls_server.cpp b/src/lib/tls/tls_server.cpp
index f864df391..39ebe2a59 100644
--- a/src/lib/tls/tls_server.cpp
+++ b/src/lib/tls/tls_server.cpp
@@ -228,6 +228,44 @@ Server::Server(const Callbacks& callbacks,
{
}
+Server::Server(output_fn output,
+ data_cb data_cb,
+ alert_cb alert_cb,
+ handshake_cb handshake_cb,
+ Session_Manager& session_manager,
+ Credentials_Manager& creds,
+ const Policy& policy,
+ RandomNumberGenerator& rng,
+ next_protocol_fn next_proto,
+ bool is_datagram,
+ size_t io_buf_sz) :
+ Channel(output, data_cb, alert_cb, handshake_cb,
+ Channel::handshake_msg_cb(), session_manager,
+ rng, policy, is_datagram, io_buf_sz),
+ m_creds(creds),
+ m_choose_next_protocol(next_proto)
+ {
+ }
+
+
+Server::Server(output_fn output,
+ data_cb data_cb,
+ alert_cb alert_cb,
+ handshake_cb handshake_cb,
+ handshake_msg_cb hs_msg_cb,
+ Session_Manager& session_manager,
+ Credentials_Manager& creds,
+ const Policy& policy,
+ RandomNumberGenerator& rng,
+ next_protocol_fn next_proto,
+ bool is_datagram) :
+ Channel(output, data_cb, alert_cb, handshake_cb, hs_msg_cb,
+ session_manager, rng, policy, is_datagram),
+ m_creds(creds),
+ m_choose_next_protocol(next_proto)
+ {
+ }
+
Handshake_State* Server::new_handshake_state(Handshake_IO* io)
{
std::unique_ptr<Handshake_State> state(