diff options
author | Kai Michaelis <[email protected]> | 2016-06-01 11:57:42 +0200 |
---|---|---|
committer | Kai Michaelis <[email protected]> | 2016-06-01 11:57:42 +0200 |
commit | cf74d1c376df1d9e6400e264a1d059720eeaa059 (patch) | |
tree | ac16b3e568c59a710af79020c0fee96887a9c4df /src/lib/tls/tls_channel.cpp | |
parent | 57a3f3272c96a83c5c87c36761caee83982be498 (diff) |
make sure kdf labels are always used
Diffstat (limited to 'src/lib/tls/tls_channel.cpp')
-rw-r--r-- | src/lib/tls/tls_channel.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/tls/tls_channel.cpp b/src/lib/tls/tls_channel.cpp index 03e99c24f..f445eef99 100644 --- a/src/lib/tls/tls_channel.cpp +++ b/src/lib/tls/tls_channel.cpp @@ -621,7 +621,6 @@ SymmetricKey Channel::key_material_export(const std::string& label, active->session_keys().master_secret(); std::vector<byte> salt; - salt += to_byte_vector(label); salt += active->client_hello()->random(); salt += active->server_hello()->random(); @@ -635,7 +634,7 @@ SymmetricKey Channel::key_material_export(const std::string& label, salt += to_byte_vector(context); } - return prf->derive_key(length, master_secret, salt, secure_vector<byte>()); + return prf->derive_key(length, master_secret, salt, to_byte_vector(label)); } else throw Exception("Channel::key_material_export connection not active"); |