DPE: Get RoT CDI key through the Crypto interface
Instead of relying on a platform component to export the RoT
CDI key, do it directly from the Crypto interface of the DPE
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
Change-Id: I194d798cd06067693b5c2c02636ed4065d923c13
diff --git a/partitions/dice_protection_environment/dpe_context_mngr.c b/partitions/dice_protection_environment/dpe_context_mngr.c
index 48cde1c..eab9db7 100644
--- a/partitions/dice_protection_environment/dpe_context_mngr.c
+++ b/partitions/dice_protection_environment/dpe_context_mngr.c
@@ -466,7 +466,6 @@
#ifdef DPE_TEST_MODE
uint8_t rot_cdi_input[DICE_CDI_SIZE] = TEST_ROT_CDI_VAL;
#else
- int ret;
uint8_t rot_cdi_input[DICE_CDI_SIZE];
#endif /* DPE_TEST_MODE */
psa_status_t status;
@@ -478,9 +477,8 @@
#ifndef DPE_TEST_MODE
/* Get the RoT CDI input for the RoT layer */
- ret = dpe_plat_get_rot_cdi(&rot_cdi_input[0],
- sizeof(rot_cdi_input));
- if (ret != 0) {
+ status = get_rot_cdi_input(&rot_cdi_input[0], sizeof(rot_cdi_input));
+ if (status != PSA_SUCCESS) {
return DPE_INTERNAL_ERROR;
}
#endif /* DPE_TEST_MODE */