From d146e65c66bc157c5a884d0ea5ac6cb167a4c929 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 11 Jan 2012 20:01:33 +0000 Subject: Outline of RFC 5077 session tickets --- src/tls/tls_session.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/tls/tls_session.h') 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 #include #include +#include namespace Botan { @@ -54,6 +55,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 encrypt(const SymmetricKey& key, + const MemoryRegion& key_name, + RandomNumberGenerator& rng); + + static TLS_Session decrypt(const MemoryRegion& ctext, + const SymmetricKey& key, + const MemoryRegion& key_name); + /** * Encode this session data for storage * @warning if the master secret is compromised so is the -- cgit v1.2.3