diff options
author | lloyd <[email protected]> | 2012-01-19 17:07:03 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-19 17:07:03 +0000 |
commit | 239241568d4d3ff14d2d1994e5829f3d548f2078 (patch) | |
tree | a21fe21d7c229f00ae06859dbe1768ead68e6d13 /src/tls/c_hello.cpp | |
parent | 30104a60568b392886c1d717a7ca006378552e4d (diff) |
Remove Handshake_Message::deserialize which was an unnecessary hook.
Instead deserialize directly in the constructors that are passed the
raw message data. This makes it easier to pass contextual information
needed for decoding (eg, version numbers) where necessary.
Diffstat (limited to 'src/tls/c_hello.cpp')
-rw-r--r-- | src/tls/c_hello.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tls/c_hello.cpp b/src/tls/c_hello.cpp index 6c4964fb1..60f6de487 100644 --- a/src/tls/c_hello.cpp +++ b/src/tls/c_hello.cpp @@ -56,20 +56,20 @@ Hello_Request::Hello_Request(Record_Writer& writer) } /* -* Serialize a Hello Request message +* Deserialize a Hello Request message */ -MemoryVector<byte> Hello_Request::serialize() const +Hello_Request::Hello_Request(const MemoryRegion<byte>& buf) { - return MemoryVector<byte>(); + if(buf.size()) + throw Decoding_Error("Hello_Request: Must be empty, and is not"); } /* -* Deserialize a Hello Request message +* Serialize a Hello Request message */ -void Hello_Request::deserialize(const MemoryRegion<byte>& buf) +MemoryVector<byte> Hello_Request::serialize() const { - if(buf.size()) - throw Decoding_Error("Hello_Request: Must be empty, and is not"); + return MemoryVector<byte>(); } /* |