diff options
Diffstat (limited to 'src/tls')
-rw-r--r-- | src/tls/tls_channel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp index 5e9235f36..6bbb64a5d 100644 --- a/src/tls/tls_channel.cpp +++ b/src/tls/tls_channel.cpp @@ -30,6 +30,8 @@ Channel::Channel(std::function<void (const byte[], size_t)> output_fn, m_rng(rng), m_session_manager(session_manager) { + m_writebuf.reserve(16*1024); + m_readbuf.reserve(16*1024); } Channel::~Channel() @@ -396,6 +398,11 @@ size_t Channel::received_data(const byte input[], size_t input_size) send_alert(Alert(e.type(), true)); throw; } + catch(Integrity_Failure& e) + { + send_alert(Alert(Alert::BAD_RECORD_MAC, true)); + throw; + } catch(Decoding_Error& e) { send_alert(Alert(Alert::DECODE_ERROR, true)); |