Keep the client session while a signed hello replaces it

A client that re-signs its session dropped it first, so until the new
welcome came back pushes under the old key could not open and a
plaintext push was taken even from a server that seals every push.
ClientSeal::hello builds a hello without touching the session; the
welcome replaces it as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8
This commit is contained in:
rustdeskandClaude Opus 5.5 committed 2026-11-06 10:24:11 +08:00
1 parent 1462a4b17c
commit 94a6d132dc
1 file changed
+5
+5
View File
@@ -504,6 +504,11 @@ impl ClientSeal {
s.next_pn += 1;
return seal_data(&s.key, KIND_TO_SERVER, s.key_id, pn, payload);
}
self.hello(payload)
}
/// A fresh hello even under a session, which stays in use until the welcome replaces it.
pub fn hello(&mut self, payload: &[u8]) -> Option<Vec<u8>> {
let now = SystemTime::now()
.duration_since(UNIX_EPOCH)
.map_or(0, |d| d.as_millis() as u64);