diff options
Diffstat (limited to 'src/tls/msg_client_hello.cpp')
-rw-r--r-- | src/tls/msg_client_hello.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tls/msg_client_hello.cpp b/src/tls/msg_client_hello.cpp index 2d2e03752..52536e79c 100644 --- a/src/tls/msg_client_hello.cpp +++ b/src/tls/msg_client_hello.cpp @@ -156,6 +156,18 @@ Client_Hello::Client_Hello(const std::vector<byte>& buf, Handshake_Type type) deserialize_sslv2(buf); } +Client_Hello::Client_Hello(Handshake_IO& io, + Handshake_Hash& hash, + const Client_Hello& initial_hello, + const Hello_Verify_Request& hello_verify) + { + *this = initial_hello; + m_hello_cookie = hello_verify.cookie(); + + hash.reset(); + hash.update(io.send(*this)); + } + /* * Serialize a Client Hello message */ @@ -168,6 +180,10 @@ std::vector<byte> Client_Hello::serialize() const buf += m_random; append_tls_length_value(buf, m_session_id, 1); + + if(m_version.is_datagram_protocol()) + append_tls_length_value(buf, m_hello_cookie, 1); + append_tls_length_value(buf, m_suites, 2); append_tls_length_value(buf, m_comp_methods, 1); |