From f91833942f3fac3707790b308b0f734fba3fc18e Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Wed, 7 Aug 2024 13:27:00 -0400 Subject: [PATCH] Actully return the error --- attest-data/src/messages.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/attest-data/src/messages.rs b/attest-data/src/messages.rs index 6ceca61..c0ec3db 100644 --- a/attest-data/src/messages.rs +++ b/attest-data/src/messages.rs @@ -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) }