diff options
author | lloyd <[email protected]> | 2012-03-16 17:36:54 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-03-16 17:36:54 +0000 |
commit | 79119349636d195f8787384b72a7fc3f6935d784 (patch) | |
tree | e43f994b65ee453c9affa5a75ea722dc34b64e7a /src/tls/tls_session.h | |
parent | 9309bf44ca05e70100a4ef1653faf602e456cdd9 (diff) | |
parent | 1fce3fe2274cf3368e1f29827ed0f41cebba3726 (diff) |
propagate from branch 'net.randombit.botan.tls-state-machine' (head 9a12f28252f9b0a051a85c4647679a715161d06c)
to branch 'net.randombit.botan.tls-session-ticket' (head ebf45d24a44fb4d1e66e59fe8abefe6f8a53cf02)
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 96b6d6daf..40aaee278 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 */ @@ -13,6 +13,7 @@ #include <botan/tls_ciphersuite.h> #include <botan/tls_magic.h> #include <botan/secmem.h> +#include <botan/symkey.h> namespace Botan { @@ -71,6 +72,17 @@ class BOTAN_DLL Session SecureVector<byte> DER_encode() const; /** + * 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 |