Check if the installed component digest matches.
The purpose of this function is to check if the specific component is installed in the system. The function checks the input digest against the value stored inside the manifest(s) that were used to boot the system. If the input component boundaries differ from the one that is installed, the function will return false, even if the overlapping binary contents matches. This behaviour is mandatory, so an attacker cannot check each byte of the memory against the dictionary of the known hashes and read back the whole memory.
- Parameters
-
[in] | component_id | Pointer to the structure with the component ID. |
[in] | alg_id | ID of an algorithm that was used to calculate the digest. |
[in] | digest | The digest to check. |
- Return values
-
SUIT_PLAT_SUCCESS | if successful. |
SUIT_PLAT_ERR_INVAL | if input parameters are invalid. |
SUIT_PLAT_ERR_UNSUPPORTED | if specified digest type is not supported. |
SUIT_SSF_FAIL_CONDITION | if the digest does not match. |
SUIT_SSF_MISSING_COMPONENT | if the digest of the specified memory is unknown. |
SUIT_PLAT_ERR_IPC | in case of SSF protocol error. |