Harden terminal reconnect packet handling

This commit is contained in:
DuProcess
2026-07-07 11:48:59 -04:00
parent b90c34dc17
commit 6b12b3dfe0
4 changed files with 100 additions and 6 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ pub fn decode(input: &[u8]) -> Result<Packet> {
pub fn decrypt_body(packet: &Packet, key: &[u8; 32], direction: u32) -> Result<Vec<u8>> {
if packet.header.flags & 1 == 0 {
return Ok(packet.body.clone());
bail!("packet body is not encrypted");
}
let nonce = crypto::nonce_from(direction, packet.header.seq);
let aad = packet.header.aad();