aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-08-07 14:08:54 +0000
committerlloyd <[email protected]>2012-08-07 14:08:54 +0000
commit0749e12e2038a1f9eac8b94e6bc0914a75dce983 (patch)
tree2d54d2f86b4a22bfe41635eb23437a1afe6e3058
parent1da4add61ed535fac5521d3bda5821aa6cc081b5 (diff)
This was in an awkward place
-rw-r--r--src/tls/rec_read.cpp3
1 files changed, 1 insertions, 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);