diff options
Diffstat (limited to 'src/tls/tls_session.h')
-rw-r--r-- | src/tls/tls_session.h | 14 |
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 |