From f2f86c76f59dcb79487949a5d47c13561abe5024 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Wed, 25 Oct 2023 16:27:10 +0000 Subject: [PATCH] fixup! Implement tr_serialize and tr_deserialize Signed-off-by: Simon Brand --- .../context_tests/general_esys_tr_tests.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tss-esapi/tests/integration_tests/context_tests/general_esys_tr_tests.rs b/tss-esapi/tests/integration_tests/context_tests/general_esys_tr_tests.rs index ffdfdeaf..dc695135 100644 --- a/tss-esapi/tests/integration_tests/context_tests/general_esys_tr_tests.rs +++ b/tss-esapi/tests/integration_tests/context_tests/general_esys_tr_tests.rs @@ -468,10 +468,12 @@ mod test_tr_serialize_tr_deserialize { .unwrap() .key_handle; let data = context.tr_serialize(key_handle.into()).unwrap(); - let new_handle = context.tr_deserialize(&data).unwrap().into(); + // Load handle in a new context + let mut context_new = create_ctx_with_session(); + let new_handle = context_new.tr_deserialize(data).unwrap().into(); assert_eq!( context.read_public(key_handle).unwrap(), - context.read_public(new_handle).unwrap() + context_new.read_public(new_handle).unwrap() ); } }