mirror of https://github.com/wolfSSL/wolfBoot.git
tpm: include self test wrapper
parent
e784c75aef
commit
37fb0aaa2a
|
@ -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__)
|
wolfBoot_tpm2_extend(WOLFBOOT_MEASURED_PCR_A, (hash), __LINE__)
|
||||||
#endif /* WOLFBOOT_MEASURED_BOOT */
|
#endif /* WOLFBOOT_MEASURED_BOOT */
|
||||||
|
|
||||||
|
int wolfBoot_tpm_self_test(void);
|
||||||
|
|
||||||
/* debugging */
|
/* debugging */
|
||||||
void wolfBoot_print_hexstr(const unsigned char* bin, unsigned long sz,
|
void wolfBoot_print_hexstr(const unsigned char* bin, unsigned long sz,
|
||||||
unsigned long maxLine);
|
unsigned long maxLine);
|
||||||
|
|
12
src/tpm.c
12
src/tpm.c
|
@ -1320,5 +1320,17 @@ int wolfBoot_check_rot(int key_slot, uint8_t* pubkey_hint)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif
|
#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 */
|
#endif /* WOLFBOOT_TPM */
|
||||||
|
|
Loading…
Reference in New Issue