MA-18406 Fix panic when provision keys on boards without rpmb key
authorJi Luo <ji.luo@nxp.com>
Mon, 14 Dec 2020 06:47:04 +0000 (14:47 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:18 +0000 (09:49 +0800)
commitca81aac985b80f614e422e1834ca209a50ad45b1
treee69d1f066133b0bd17b7145dba9373a5d4ac068f
parentbeef004c1daa5494f590c3307e7cb28d460a65eb
MA-18406 Fix panic when provision keys on boards without rpmb key

The keymaster client won't be initialized if the rpmb
key is not set, return early with error in such case
to avoid panic.

Test: provision attestation keys & certs on boards without
      rpmb key set.

Change-Id: I6f908aecafd15ab390629cb89b090c9ee817ba1e
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit b999b03c3eb153a99b481e42315e048653247107)
(cherry picked from commit 8e2cacff502629d88d5dd49baae3e547728e7af7)
lib/trusty/ql-tipc/keymaster.c