Skip to content

Commit d523ce2

Browse files
committedNov 18, 2021
Adapt test case for swtpm
Signed-off-by: Ionut Mihalcea <[email protected]>
1 parent c01cf01 commit d523ce2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎tss-esapi/tests/integration_tests/abstraction_tests/transient_key_context_tests.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,11 @@ fn activate_credential_wrong_data() {
843843
.activate_credential(obj, None, vec![0xaa; 52], vec![0x55; 256])
844844
.unwrap_err();
845845
if let Error::Tss2Error(e) = e {
846-
assert_eq!(e.kind(), Some(Tss2ResponseCodeKind::Value));
846+
// IBM software TPM returns Value, swtpm returns Failure...
847+
assert!(matches!(
848+
e.kind(),
849+
Some(Tss2ResponseCodeKind::Value) | Some(Tss2ResponseCodeKind::Failure)
850+
));
847851
} else {
848852
panic!("Got crate error ({}) when expecting an error from TPM.", e);
849853
}

0 commit comments

Comments
 (0)