aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_channel.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-09-07 00:25:04 +0000
committerlloyd <[email protected]>2012-09-07 00:25:04 +0000
commit70781697af4a4f6d94f04198b25a556d0a78ee81 (patch)
tree05bd7292f9046dedba36782dfd78f1e1bcd0ad5d /src/tls/tls_channel.cpp
parentd25cad6ab69d4869e5a966a9f9c7f5b73e3790a3 (diff)
Remove bogus forced 64 byte mtu.
Fix DTLS CCS sequence number reset. Handle (partially) explicit sequence numbers in records. Need to output the record.
Diffstat (limited to 'src/tls/tls_channel.cpp')
-rw-r--r--src/tls/tls_channel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp
index 5e1e546a4..91aaae206 100644
--- a/src/tls/tls_channel.cpp
+++ b/src/tls/tls_channel.cpp
@@ -100,8 +100,13 @@ void Channel::change_cipher_spec_writer(Connection_Side side)
A sequence number is incremented after each record: specifically,
the first record transmitted under a particular connection state
MUST use sequence number 0
+
+ For DTLS, increment the epoch
*/
- m_write_seq_no = 0;
+ if(current_protocol_version().is_datagram_protocol())
+ m_write_seq_no = ((m_write_seq_no >> 48) + 1) << 48;
+ else
+ m_write_seq_no = 0;
m_write_cipherstate.reset(
new Connection_Cipher_State(current_protocol_version(),