aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-09-09 21:57:58 +0000
committerlloyd <[email protected]>2012-09-09 21:57:58 +0000
commit8a95a6a4bf428ac18077fb6b914aa527428e2ee2 (patch)
treeb2c8bf2421be56875a55c2ec4dd02ca5e129e527
parent384e42909cf0d0ecf48b0654cde216172562a939 (diff)
Expect a cookie field in a DTLS client hello
-rw-r--r--src/tls/msg_client_hello.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tls/msg_client_hello.cpp b/src/tls/msg_client_hello.cpp
index 30d34ef78..ca10cab85 100644
--- a/src/tls/msg_client_hello.cpp
+++ b/src/tls/msg_client_hello.cpp
@@ -270,6 +270,9 @@ void Client_Hello::deserialize(const std::vector<byte>& buf)
m_random = reader.get_fixed<byte>(32);
+ if(m_version.is_datagram_protocol())
+ m_hello_cookie = reader.get_range<byte>(1, 0, 255);
+
m_session_id = reader.get_range<byte>(1, 0, 32);
m_suites = reader.get_range_vector<u16bit>(2, 1, 32767);