tpm: include self test wrapper

pull/443/head
Marco Oliverio 2024-03-20 16:03:55 +01:00
parent e784c75aef
commit 37fb0aaa2a
2 changed files with 14 additions and 0 deletions

View File

@ -106,6 +106,8 @@ int wolfBoot_tpm2_extend(uint8_t pcrIndex, uint8_t* hash, int line);
wolfBoot_tpm2_extend(WOLFBOOT_MEASURED_PCR_A, (hash), __LINE__)
#endif /* WOLFBOOT_MEASURED_BOOT */
int wolfBoot_tpm_self_test(void);
/* debugging */
void wolfBoot_print_hexstr(const unsigned char* bin, unsigned long sz,
unsigned long maxLine);

View File

@ -1320,5 +1320,17 @@ int wolfBoot_check_rot(int key_slot, uint8_t* pubkey_hint)
return rc;
}
#endif
/**
* @brief Perform TPM2 self test.
*
* This function performs the TPM2 self test.
*
* @return TPM_RC_SUCCESS in case of success
*
*/
int wolfBoot_tpm_self_test(void)
{
return wolfTPM2_SelfTest(&wolftpm_dev);
}
#endif /* WOLFBOOT_TPM */