session: fix store secret

master
occheung 2020-10-17 22:28:45 +08:00
parent 404804809e
commit a2ad8b3334
1 changed files with 12 additions and 0 deletions

View File

@ -133,6 +133,12 @@ impl Session {
ecdhe_shared_secret.as_bytes()
);
// Store the handshake secret
self.latest_secret.replace(
Vec::from_slice(&handshake_secret)
.unwrap()
);
let client_handshake_traffic_secret = derive_secret(
&handshake_secret_hkdf,
"c hs traffic",
@ -305,6 +311,12 @@ impl Session {
ecdhe_shared_secret.as_bytes()
);
// Store the handshake secret
self.latest_secret.replace(
Vec::from_slice(&handshake_secret)
.unwrap()
);
let client_handshake_traffic_secret = derive_secret(
&handshake_secret_hkdf,
"c hs traffic",