linaro-swg / optee_examples

OP-TEE Sample Applications
Other
163 stars 140 forks source link

random: use private buffer #77

Closed jforissier closed 3 years ago

jforissier commented 3 years ago

TEE_GenerateRandom() has the [out] annotation which mandates that the buffer "SHALL not reside in a block of shared memory owned by a client of the Trusted Application" [1]. Fix this by allocating a temporary buffer from the heap.

[1] TEE Internal Core API Specification v1.1

Signed-off-by: Jerome Forissier jerome@forissier.org