diff options
author | lloyd <[email protected]> | 2012-08-06 10:50:41 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-08-06 10:50:41 +0000 |
commit | 943ecbcce90b504f3ef9fe328136323b0d248c17 (patch) | |
tree | 0aa0c4611f7d0c75965af3abe2bc521c82f25ae0 /src/tls/tls_session_key.cpp | |
parent | a250506355588554dbd84181a94bb3a96234376e (diff) |
Have all the TLS handshake messages stored in unique_ptrs with only
const access after setting them. Fix some const issues.
Diffstat (limited to 'src/tls/tls_session_key.cpp')
-rw-r--r-- | src/tls/tls_session_key.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tls/tls_session_key.cpp b/src/tls/tls_session_key.cpp index 0cd74a63a..bc636c0cb 100644 --- a/src/tls/tls_session_key.cpp +++ b/src/tls/tls_session_key.cpp @@ -18,7 +18,7 @@ namespace TLS { /** * Session_Keys Constructor */ -Session_Keys::Session_Keys(Handshake_State* state, +Session_Keys::Session_Keys(const Handshake_State* state, const secure_vector<byte>& pre_master_secret, bool resuming) { @@ -50,8 +50,8 @@ Session_Keys::Session_Keys(Handshake_State* state, if(state->version() != Protocol_Version::SSL_V3) salt += std::make_pair(MASTER_SECRET_MAGIC, sizeof(MASTER_SECRET_MAGIC)); - salt += state->client_hello->random(); - salt += state->server_hello->random(); + salt += state->client_hello()->random(); + salt += state->server_hello()->random(); master_sec = prf->derive_key(48, pre_master_secret, salt); } @@ -59,8 +59,8 @@ Session_Keys::Session_Keys(Handshake_State* state, secure_vector<byte> salt; if(state->version() != Protocol_Version::SSL_V3) salt += std::make_pair(KEY_GEN_MAGIC, sizeof(KEY_GEN_MAGIC)); - salt += state->server_hello->random(); - salt += state->client_hello->random(); + salt += state->server_hello()->random(); + salt += state->client_hello()->random(); SymmetricKey keyblock = prf->derive_key(prf_gen, master_sec, salt); |