aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl/tls_session_key.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-15 13:44:42 +0000
committerlloyd <[email protected]>2010-09-15 13:44:42 +0000
commit180c5358cb31e9c003cada3705bb30cf01732878 (patch)
tree951038dfaf2c33bcee5e27c4b1d2980eb35494a3 /src/ssl/tls_session_key.cpp
parenta9d0f37596e5413cae45f32740738c5c68abcce1 (diff)
Update all uses of MemoryRegion::append to use either push_back or operator+=
Diffstat (limited to 'src/ssl/tls_session_key.cpp')
-rw-r--r--src/ssl/tls_session_key.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ssl/tls_session_key.cpp b/src/ssl/tls_session_key.cpp
index 138d0a77c..341ce7bb0 100644
--- a/src/ssl/tls_session_key.cpp
+++ b/src/ssl/tls_session_key.cpp
@@ -79,14 +79,14 @@ SymmetricKey SessionKeys::ssl3_keygen(u32bit prf_gen,
SSL3_PRF prf;
SecureVector<byte> salt;
- salt.append(client_random);
- salt.append(server_random);
+ salt += client_random;
+ salt += server_random;
master_sec = prf.derive_key(48, pre_master, salt);
salt.clear();
- salt.append(server_random);
- salt.append(client_random);
+ salt += server_random;
+ salt += client_random;
return prf.derive_key(prf_gen, master_sec, salt);
}
@@ -109,16 +109,16 @@ SymmetricKey SessionKeys::tls1_keygen(u32bit prf_gen,
TLS_PRF prf;
SecureVector<byte> salt;
- salt.append(MASTER_SECRET_MAGIC, sizeof(MASTER_SECRET_MAGIC));
- salt.append(client_random);
- salt.append(server_random);
+ salt += std::make_pair(MASTER_SECRET_MAGIC, sizeof(MASTER_SECRET_MAGIC));
+ salt += client_random;
+ salt += server_random;
master_sec = prf.derive_key(48, pre_master, salt);
salt.clear();
- salt.append(KEY_GEN_MAGIC, sizeof(KEY_GEN_MAGIC));
- salt.append(server_random);
- salt.append(client_random);
+ salt += std::make_pair(KEY_GEN_MAGIC, sizeof(KEY_GEN_MAGIC));
+ salt += server_random;
+ salt += client_random;
return prf.derive_key(prf_gen, master_sec, salt);
}