From: Jakub Wlostowski Date: Wed, 23 Apr 2025 10:11:56 +0000 (+0200) Subject: Fix unwrap concatenated X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F323151%2F2;p=platform%2Fhal%2Fbackend%2Femulator%2Fsecurity-keys.git Fix unwrap concatenated Change-Id: Ia4774163f4870488be9c0427a9a7aa70da62dad5 --- diff --git a/src/hal-backend-security-keys-api.cpp b/src/hal-backend-security-keys-api.cpp index 664f08d..30a0883 100644 --- a/src/hal-backend-security-keys-api.cpp +++ b/src/hal-backend-security-keys-api.cpp @@ -1098,12 +1098,11 @@ int security_keys_unwrap_concatenated_data(const hal_security_keys_context_s con s_in.Serialize(in_memory); TZSerializer s_out; - uint32_t out_memory_size = KM_RSA_BLOCK_SIZE; + s_out.Push(new TZSerializableBinary(KM_RSA_BLOCK_SIZE, false)); bool with_pwd = !key_pwd.password.buffer ? 0 : 1; if (with_pwd) - out_memory_size += Params::DEFAULT_AES_GCM_TAG_LEN_BYTES; + s_out.Push(new TZSerializableBinary(Params::DEFAULT_AES_GCM_TAG_LEN_BYTES)); - s_out.Push(new TZSerializableBinary(out_memory_size, false)); TrustZoneMemory out_memory(*tz_context, s_out.GetSize(), TEEC_MEM_OUTPUT); s_out.Serialize(out_memory);