aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_session_key.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/tls_session_key.h')
-rw-r--r--src/lib/tls/tls_session_key.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/lib/tls/tls_session_key.h b/src/lib/tls/tls_session_key.h
index 2ea18d636..8399a9676 100644
--- a/src/lib/tls/tls_session_key.h
+++ b/src/lib/tls/tls_session_key.h
@@ -14,27 +14,58 @@ namespace Botan {
namespace TLS {
+class Handshake_State;
+
/**
* TLS Session Keys
*/
class Session_Keys
{
public:
+ /**
+ * @return client encipherment key
+ */
const SymmetricKey& client_cipher_key() const { return m_c_cipher; }
+
+ /**
+ * @return client encipherment key
+ */
const SymmetricKey& server_cipher_key() const { return m_s_cipher; }
+ /**
+ * @return client MAC key
+ */
const SymmetricKey& client_mac_key() const { return m_c_mac; }
+
+ /**
+ * @return server MAC key
+ */
const SymmetricKey& server_mac_key() const { return m_s_mac; }
+ /**
+ * @return client IV
+ */
const InitializationVector& client_iv() const { return m_c_iv; }
+
+ /**
+ * @return server IV
+ */
const InitializationVector& server_iv() const { return m_s_iv; }
+ /**
+ * @return TLS master secret
+ */
const secure_vector<byte>& master_secret() const { return m_master_sec; }
Session_Keys() {}
- Session_Keys(const class Handshake_State* state,
- const secure_vector<byte>& pre_master,
+ /**
+ * @param state state the handshake state
+ * @param pre_master_secret the pre-master secret
+ * @param resuming whether this TLS session is resumed
+ */
+ Session_Keys(const Handshake_State* state,
+ const secure_vector<byte>& pre_master_secret,
bool resuming);
private: