diff options
author | Matthias Gierlings <[email protected]> | 2016-05-16 20:46:50 +0200 |
---|---|---|
committer | Matthias Gierlings <[email protected]> | 2016-06-19 18:28:36 +0200 |
commit | 93df95db45fa126725808fbd53aa978b00cf08ad (patch) | |
tree | 9c0b81ef8488a7c3142d1f95ac5904470ac3c3a9 /src/lib/tls/tls_channel.cpp | |
parent | 89b75a5a36c18a7593aa6bdbb472e301904a66b3 (diff) |
Added virtual Callback Interface
- extracted inner class TLS::Channel::Callbacks to stand-alone class
TLS::Callbacks.
- provided default implementations for TLS::Callbacks members executing
calls to std::function members for backward compatibility.
- applied changes to cli, tests and TLS::Channel related classes to be
compatible with new interface.
Diffstat (limited to 'src/lib/tls/tls_channel.cpp')
-rw-r--r-- | src/lib/tls/tls_channel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/tls/tls_channel.cpp b/src/lib/tls/tls_channel.cpp index 6300bd52b..9bd3e5603 100644 --- a/src/lib/tls/tls_channel.cpp +++ b/src/lib/tls/tls_channel.cpp @@ -409,7 +409,7 @@ void Channel::process_application_data(secure_vector<byte>& record) * following record. Avoid spurious callbacks. */ if(record.size() > 0) - m_callbacks.app_data()(record.data(), record.size()); + m_callbacks.app_data(record.data(), record.size()); } void Channel::process_alert(secure_vector<byte>& record) @@ -419,7 +419,7 @@ void Channel::process_alert(secure_vector<byte>& record) if(alert_msg.type() == Alert::NO_RENEGOTIATION) m_pending_state.reset(); - m_callbacks.alert()(alert_msg); + m_callbacks.alert(alert_msg); if(alert_msg.is_fatal()) { @@ -454,7 +454,7 @@ void Channel::write_record(Connection_Cipher_State* cipher_state, u16bit epoch, cipher_state, m_rng); - m_callbacks.out_fn()(m_writebuf.data(), m_writebuf.size()); + m_callbacks.out_fn(m_writebuf.data(), m_writebuf.size()); } void Channel::send_record_array(u16bit epoch, byte type, const byte input[], size_t length) |