Botan
1.11.15
|
00001 /* 00002 * TLS Session Key 00003 * (C) 2004-2006,2011 Jack Lloyd 00004 * 00005 * Botan is released under the Simplified BSD License (see license.txt) 00006 */ 00007 00008 #ifndef BOTAN_TLS_SESSION_KEYS_H__ 00009 #define BOTAN_TLS_SESSION_KEYS_H__ 00010 00011 #include <botan/symkey.h> 00012 00013 namespace Botan { 00014 00015 namespace TLS { 00016 00017 /** 00018 * TLS Session Keys 00019 */ 00020 class Session_Keys 00021 { 00022 public: 00023 SymmetricKey client_cipher_key() const { return c_cipher; } 00024 SymmetricKey server_cipher_key() const { return s_cipher; } 00025 00026 SymmetricKey client_mac_key() const { return c_mac; } 00027 SymmetricKey server_mac_key() const { return s_mac; } 00028 00029 InitializationVector client_iv() const { return c_iv; } 00030 InitializationVector server_iv() const { return s_iv; } 00031 00032 const secure_vector<byte>& master_secret() const { return master_sec; } 00033 00034 Session_Keys() {} 00035 00036 Session_Keys(const class Handshake_State* state, 00037 const secure_vector<byte>& pre_master, 00038 bool resuming); 00039 00040 private: 00041 secure_vector<byte> master_sec; 00042 SymmetricKey c_cipher, s_cipher, c_mac, s_mac; 00043 InitializationVector c_iv, s_iv; 00044 }; 00045 00046 } 00047 00048 } 00049 00050 #endif