From 0749e12e2038a1f9eac8b94e6bc0914a75dce983 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 7 Aug 2012 14:08:54 +0000 Subject: This was in an awkward place --- src/tls/rec_read.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tls/rec_read.cpp b/src/tls/rec_read.cpp index 276ae5732..be5f2ea2f 100644 --- a/src/tls/rec_read.cpp +++ b/src/tls/rec_read.cpp @@ -367,8 +367,6 @@ size_t Record_Reader::add_input(const byte input_array[], size_t input_sz, m_mac->update_be(plain_length); m_mac->update(&m_readbuf[TLS_HEADER_SIZE + m_iv_size], plain_length); - msg_sequence = m_seq_no++; - m_mac->final(&m_macbuf[0]); const size_t mac_offset = record_len - (m_macbuf.size() + pad_size); @@ -377,6 +375,7 @@ size_t Record_Reader::add_input(const byte input_array[], size_t input_sz, throw TLS_Exception(Alert::BAD_RECORD_MAC, "Message authentication failure"); msg_type = m_readbuf[0]; + msg_sequence = m_seq_no++; msg.resize(plain_length); copy_mem(&msg[0], &m_readbuf[TLS_HEADER_SIZE + m_iv_size], plain_length); -- cgit v1.2.3