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);