aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/session_ticket.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 20:32:36 +0000
committerlloyd <[email protected]>2012-05-18 20:32:36 +0000
commitc691561f3198f481c13457433efbccc1c9fcd898 (patch)
treea45ea2c5a30e0cb009fbcb68a61ef39332ff790c /src/tls/session_ticket.cpp
parentd76700f01c7ecac5633edf75f8d7408b46c5dbac (diff)
Fairly huge update that replaces the old secmem types with std::vector
using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
Diffstat (limited to 'src/tls/session_ticket.cpp')
-rw-r--r--src/tls/session_ticket.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tls/session_ticket.cpp b/src/tls/session_ticket.cpp
index 273996a16..8cee2a454 100644
--- a/src/tls/session_ticket.cpp
+++ b/src/tls/session_ticket.cpp
@@ -17,7 +17,7 @@ namespace TLS {
New_Session_Ticket::New_Session_Ticket(Record_Writer& writer,
Handshake_Hash& hash,
- const MemoryRegion<byte>& ticket,
+ const std::vector<byte>& ticket,
u32bit lifetime) :
m_ticket_lifetime_hint(lifetime),
m_ticket(ticket)
@@ -32,7 +32,7 @@ New_Session_Ticket::New_Session_Ticket(Record_Writer& writer,
hash.update(writer.send(*this));
}
-New_Session_Ticket::New_Session_Ticket(const MemoryRegion<byte>& buf) :
+New_Session_Ticket::New_Session_Ticket(const std::vector<byte>& buf) :
m_ticket_lifetime_hint(0)
{
if(buf.size() < 6)
@@ -44,9 +44,9 @@ New_Session_Ticket::New_Session_Ticket(const MemoryRegion<byte>& buf) :
m_ticket = reader.get_range<byte>(2, 0, 65535);
}
-MemoryVector<byte> New_Session_Ticket::serialize() const
+std::vector<byte> New_Session_Ticket::serialize() const
{
- MemoryVector<byte> buf(4);
+ std::vector<byte> buf(4);
store_be(m_ticket_lifetime_hint, &buf[0]);
append_tls_length_value(buf, m_ticket, 2);
return buf;