Skip to content

Commit

Permalink
Actully return the error
Browse files Browse the repository at this point in the history
  • Loading branch information
labbott committed Aug 7, 2024
1 parent 10d084e commit f918339
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions attest-data/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,13 @@ pub fn parse_response(
return Err(HostToRotError::VersionMismatch);
}

if command != expected {
return Err(HostToRotError::UnexpectedCommand);
match command {
RotToHost::HostToRotError(e) => return Err(e),
c => {
if c != expected {
return Err(HostToRotError::UnexpectedCommand);
}
}
}
Ok(leftover)
}
Expand Down

0 comments on commit f918339

Please sign in to comment.