aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl/tls_messages.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-04-17 21:28:30 +0000
committerlloyd <[email protected]>2010-04-17 21:28:30 +0000
commitee353b33dae5fd2a664ac56556e2037284735a47 (patch)
treee36be6f9a35ec5e0ae08216d8a3ce5339c21868f /src/ssl/tls_messages.h
parentaaa9e92697e16278fb91552f075c020f2b4c26cb (diff)
Add support for reading SSLv2 client hellos
Diffstat (limited to 'src/ssl/tls_messages.h')
-rw-r--r--src/ssl/tls_messages.h11
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;