aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_session.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-11 20:01:33 +0000
committerlloyd <[email protected]>2012-01-11 20:01:33 +0000
commitd146e65c66bc157c5a884d0ea5ac6cb167a4c929 (patch)
tree4a6eae6530c795a521e6ac1b2dbc37fb74f39e95 /src/tls/tls_session.h
parentd6ec0f46e79f4b99194f8257e1f226b5ec05fe32 (diff)
Outline of RFC 5077 session tickets
Diffstat (limited to 'src/tls/tls_session.h')
-rw-r--r--src/tls/tls_session.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/tls/tls_session.h b/src/tls/tls_session.h
index b4b3861ed..4a8d50e26 100644
--- a/src/tls/tls_session.h
+++ b/src/tls/tls_session.h
@@ -1,6 +1,6 @@
/*
* TLS Session
-* (C) 2011 Jack Lloyd
+* (C) 2011-2012 Jack Lloyd
*
* Released under the terms of the Botan license
*/
@@ -11,6 +11,7 @@
#include <botan/x509cert.h>
#include <botan/tls_magic.h>
#include <botan/secmem.h>
+#include <botan/symkey.h>
namespace Botan {
@@ -55,6 +56,17 @@ class BOTAN_DLL TLS_Session
TLS_Session(const byte ber[], size_t ber_len);
/**
+ * Encrypt a session (useful for serialization or session tickets)
+ */
+ MemoryVector<byte> encrypt(const SymmetricKey& key,
+ const MemoryRegion<byte>& key_name,
+ RandomNumberGenerator& rng);
+
+ static TLS_Session decrypt(const MemoryRegion<byte>& ctext,
+ const SymmetricKey& key,
+ const MemoryRegion<byte>& key_name);
+
+ /**
* Encode this session data for storage
* @warning if the master secret is compromised so is the
* session traffic