From: Krzysztof Jackiewicz Date: Tue, 11 Jul 2023 11:05:27 +0000 (+0200) Subject: Use proper memory type in TZ backend's addGcmAAD() X-Git-Tag: accepted/tizen/7.0/unified/20230717.162659~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b43f739a1f13d98004ffa73f5f151f772ca9dce2;p=platform%2Fcore%2Fsecurity%2Fkey-manager.git Use proper memory type in TZ backend's addGcmAAD() We need TEEC_VALUE_INOUT to properly read the return code from op.params[0].value.a. Change-Id: I95eb5fd757f9e3235bb855269dd0a804ac7bb135 --- diff --git a/src/manager/crypto/tz-backend/tz-context.cpp b/src/manager/crypto/tz-backend/tz-context.cpp index f33897ba..1359258b 100644 --- a/src/manager/crypto/tz-backend/tz-context.cpp +++ b/src/manager/crypto/tz-backend/tz-context.cpp @@ -510,7 +510,7 @@ void TrustZoneContext::addGcmAAD(uint32_t opId, TrustZoneMemory inMemory(m_Context, sIn.GetSize(), TEEC_MEM_INPUT); sIn.Serialize(inMemory); - TEEC_Operation op = makeOp(TEEC_VALUE_INPUT, inMemory); + TEEC_Operation op = makeOp(TEEC_VALUE_INOUT, inMemory); op.params[0].value.a = opId; Execute(CMD_CIPHER_INIT_AAD, &op);