fix(builder): add missing rc.is_warning() check
PATCH 1/1 fix(builder): add missing rc.is_warning() check
The new tests test_response_build_warning* confirm a failure in the response builder. More precisely, *with_sessions variation fails.
The bug emits from a missing is_warning check in the response, leading to an incorrectly constructed response.
Signed-off-by Jarkko Sakkinen <[email protected]>
--- src/message/build.rs | 2 +- tests/runner.rs | 66 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-)
src/message/build.rs +1 -1
@@ -98,7 +98,7 @@ whereTpmSt ::NoSessions }; -if rc.is_error () { +if rc.is_error () || rc.is_warning () { (TpmSt ::NoSessions as u16 ).build (writer)?; u32::try_from (TPM_HEADER_SIZE )?.build (writer)?; rc.value ().build (writer)?;
tests/runner.rs +66 -0
78 lines not on this page · raw message
Signature · 1 line
2.39.5