diff options
author | lloyd <[email protected]> | 2010-04-17 21:28:30 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-04-17 21:28:30 +0000 |
commit | ee353b33dae5fd2a664ac56556e2037284735a47 (patch) | |
tree | e36be6f9a35ec5e0ae08216d8a3ce5339c21868f /src/ssl/tls_messages.h | |
parent | aaa9e92697e16278fb91552f075c020f2b4c26cb (diff) |
Add support for reading SSLv2 client hellos
Diffstat (limited to 'src/ssl/tls_messages.h')
-rw-r--r-- | src/ssl/tls_messages.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ssl/tls_messages.h b/src/ssl/tls_messages.h index 1f72c05f7..42f81b1fe 100644 --- a/src/ssl/tls_messages.h +++ b/src/ssl/tls_messages.h @@ -56,10 +56,19 @@ class BOTAN_DLL Client_Hello : public HandshakeMessage Client_Hello(RandomNumberGenerator& rng, Record_Writer&, const TLS_Policy*, HandshakeHash&); - Client_Hello(const MemoryRegion<byte>& buf) { deserialize(buf); } + Client_Hello(const MemoryRegion<byte>& buf, + Handshake_Type type) + { + if(type == CLIENT_HELLO) + deserialize(buf); + else + deserialize_sslv2(buf); + } + private: SecureVector<byte> serialize() const; void deserialize(const MemoryRegion<byte>&); + void deserialize_sslv2(const MemoryRegion<byte>&); Version_Code c_version; SecureVector<byte> sess_id, c_random; |