fixup! feat(rust/trezor-thp): secure channel layer: device side

This commit is contained in:
Martin Milata
2026-02-19 12:55:40 +01:00
parent 9692609c86
commit 8268fcc07f
2 changed files with 6 additions and 2 deletions

View File

@@ -434,7 +434,9 @@ where
if res.got_message() {
let handled = self.incoming_internal();
if let Err(e) = handled {
if e != Error::InvalidChecksum {
if e == Error::InvalidChecksum {
return PacketInResult::ignore(e);
} else {
self.state = HandshakeState::Failed;
return PacketInResult::fail(e);
}

View File

@@ -481,7 +481,9 @@ where
if res.got_message() {
let handled = self.incoming_internal();
if let Err(e) = handled {
if e != Error::InvalidChecksum {
if e == Error::InvalidChecksum {
return PacketInResult::ignore(e);
} else {
self.state = HandshakeState::Failed;
return PacketInResult::fail(e);
}