aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_handshake_hash.h
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/tls_handshake_hash.h
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/tls_handshake_hash.h')
-rw-r--r--src/tls/tls_handshake_hash.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tls/tls_handshake_hash.h b/src/tls/tls_handshake_hash.h
index c13f97aa8..02943977f 100644
--- a/src/tls/tls_handshake_hash.h
+++ b/src/tls/tls_handshake_hash.h
@@ -27,25 +27,28 @@ class Handshake_Hash
void update(const byte in[], size_t length)
{ data += std::make_pair(in, length); }
- void update(const MemoryRegion<byte>& in)
+ void update(const secure_vector<byte>& in)
+ { data += in; }
+
+ void update(const std::vector<byte>& in)
{ data += in; }
void update(byte in)
{ data.push_back(in); }
void update(Handshake_Type handshake_type,
- const MemoryRegion<byte>& handshake_msg);
+ const std::vector<byte>& handshake_msg);
- SecureVector<byte> final(Protocol_Version version,
+ secure_vector<byte> final(Protocol_Version version,
const std::string& mac_algo);
- SecureVector<byte> final_ssl3(const MemoryRegion<byte>& master_secret);
+ secure_vector<byte> final_ssl3(const secure_vector<byte>& master_secret);
- const SecureVector<byte>& get_contents() const
+ const secure_vector<byte>& get_contents() const
{ return data; }
private:
- SecureVector<byte> data;
+ secure_vector<byte> data;
};
}