diff options
Diffstat (limited to 'src/tls')
-rw-r--r-- | src/tls/rec_read.cpp | 1 | ||||
-rw-r--r-- | src/tls/rec_wri.cpp | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/tls/rec_read.cpp b/src/tls/rec_read.cpp index 84a96f508..63c08cad5 100644 --- a/src/tls/rec_read.cpp +++ b/src/tls/rec_read.cpp @@ -50,6 +50,7 @@ void Record_Reader::set_keys(const CipherSuite& suite, const SessionKeys& keys, cipher.reset(); delete mac; mac = 0; + seq_no = 0; SymmetricKey mac_key, cipher_key; InitializationVector iv; diff --git a/src/tls/rec_wri.cpp b/src/tls/rec_wri.cpp index 3f6f9b7f1..a0c332c58 100644 --- a/src/tls/rec_wri.cpp +++ b/src/tls/rec_wri.cpp @@ -69,6 +69,14 @@ void Record_Writer::set_keys(const CipherSuite& suite, delete mac; mac = 0; + /* + RFC 4346: + A sequence number is incremented after each record: specifically, + the first record transmitted under a particular connection state + MUST use sequence number 0 + */ + seq_no = 0; + SymmetricKey mac_key, cipher_key; InitializationVector iv; |