diff options
author | lloyd <[email protected]> | 2012-01-11 20:49:17 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-11 20:49:17 +0000 |
commit | 4c6327c95bd01de54487b3159b77a5152ed39564 (patch) | |
tree | e76d05290c93a91b0886bad3be63c4329d0fbeb8 /src/tls | |
parent | d146e65c66bc157c5a884d0ea5ac6cb167a4c929 (diff) |
Build fixes
Diffstat (limited to 'src/tls')
-rw-r--r-- | src/tls/c_hello.cpp | 6 | ||||
-rw-r--r-- | src/tls/tls_extensions.h | 13 | ||||
-rw-r--r-- | src/tls/tls_messages.h | 8 |
3 files changed, 17 insertions, 10 deletions
diff --git a/src/tls/c_hello.cpp b/src/tls/c_hello.cpp index 6c4964fb1..2455eae3b 100644 --- a/src/tls/c_hello.cpp +++ b/src/tls/c_hello.cpp @@ -204,6 +204,7 @@ void Client_Hello::deserialize_sslv2(const MemoryRegion<byte>& buf) m_fragment_size = 0; m_next_protocol = false; + m_supports_session_ticket = false; } /* @@ -257,6 +258,11 @@ void Client_Hello::deserialize(const MemoryRegion<byte>& buf) { m_fragment_size = frag->fragment_size(); } + else if(Session_Ticket* ticket = dynamic_cast<Session_Ticket*>(extn)) + { + m_supports_session_ticket = true; + m_session_ticket = ticket->contents(); + } else if(Renegotation_Extension* reneg = dynamic_cast<Renegotation_Extension*>(extn)) { // checked by TLS_Client / TLS_Server as they know the handshake state diff --git a/src/tls/tls_extensions.h b/src/tls/tls_extensions.h index 526436862..6d4e40434 100644 --- a/src/tls/tls_extensions.h +++ b/src/tls/tls_extensions.h @@ -183,12 +183,7 @@ class Session_Ticket : public TLS_Extension TLS_Handshake_Extension_Type type() const { return TLSEXT_SESSION_TICKET; } - /* - * Decrypt the session ticket and return the session info; - * used by server. - */ - TLS_Session decrypt(const SymmetricKey& key, - const MemoryRegion<byte>& key_name); + const MemoryVector<byte>& contents() const { return m_contents; } /** * Create empty extension, used by both client and server @@ -199,14 +194,16 @@ class Session_Ticket : public TLS_Extension * Extension with ticket, used by client */ Session_Ticket(const MemoryRegion<byte>& session_ticket) : - m_contents(session_ticket); + m_contents(session_ticket) {} /** * Deserialize a session ticket */ - Session_Ticket(const TLS_Data_Reader& reader, u16ibt extension_size); + Session_Ticket(const TLS_Data_Reader& reader, u16bit extension_size); MemoryVector<byte> serialize() const { return m_contents; } + + bool empty() const { return false; } private: MemoryVector<byte> m_contents; }; diff --git a/src/tls/tls_messages.h b/src/tls/tls_messages.h index ed8073bda..94e17cb9b 100644 --- a/src/tls/tls_messages.h +++ b/src/tls/tls_messages.h @@ -79,9 +79,10 @@ class Client_Hello : public Handshake_Message size_t fragment_size() const { return m_fragment_size; } - bool supports_session_ticket() const { returnm m_supports_session_ticket; } + bool supports_session_ticket() const { return m_supports_session_ticket; } - const MemoryRegion<byte> session_ticket() const { return m_session_ticket; } + const MemoryRegion<byte>& session_ticket() const + { return m_session_ticket; } Client_Hello(Record_Writer& writer, TLS_Handshake_Hash& hash, @@ -123,6 +124,9 @@ class Client_Hello : public Handshake_Message size_t m_fragment_size; bool m_secure_renegotiation; MemoryVector<byte> m_renegotiation_info; + + bool m_supports_session_ticket; + MemoryVector<byte> m_session_ticket; }; /** |