diff options
author | Jack Lloyd <[email protected]> | 2019-05-23 15:30:19 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-05-23 15:56:27 -0400 |
commit | ff09135c0fa7910bf59850b0c9fbd9321242e42d (patch) | |
tree | 769675ba149ef1d9ad6641b4ecacf36c61fb0212 /src/lib/tls/tls_handshake_io.cpp | |
parent | 0c4f391625366a77f92cabd5cb0b4f3e0f965077 (diff) |
Verify contents of DTLS CCS message
Diffstat (limited to 'src/lib/tls/tls_handshake_io.cpp')
-rw-r--r-- | src/lib/tls/tls_handshake_io.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/tls/tls_handshake_io.cpp b/src/lib/tls/tls_handshake_io.cpp index afab1dd20..8834e0008 100644 --- a/src/lib/tls/tls_handshake_io.cpp +++ b/src/lib/tls/tls_handshake_io.cpp @@ -189,6 +189,9 @@ void Datagram_Handshake_IO::add_record(const std::vector<uint8_t>& record, if(record_type == CHANGE_CIPHER_SPEC) { + if(record.size() != 1 || record[0] != 1) + throw Decoding_Error("Invalid ChangeCipherSpec"); + // TODO: check this is otherwise empty m_ccs_epochs.insert(epoch); return; |