20 lines
539 B
C
20 lines
539 B
C
#include <VasEBoot/err.h>
|
|
#include <VasEBoot/i18n.h>
|
|
#include <VasEBoot/misc.h>
|
|
#include <VasEBoot/mm.h>
|
|
#include <VasEBoot/tpm.h>
|
|
#include <VasEBoot/term.h>
|
|
|
|
VasEBoot_err_t
|
|
VasEBoot_tpm_measure (unsigned char *buf, VasEBoot_size_t size, VasEBoot_uint8_t pcr,
|
|
const char *kind, const char *description)
|
|
{
|
|
VasEBoot_err_t ret;
|
|
char *desc = VasEBoot_xasprintf("%s %s", kind, description);
|
|
if (!desc)
|
|
return VasEBoot_ERR_OUT_OF_MEMORY;
|
|
ret = VasEBoot_tpm_log_event(buf, size, pcr, desc);
|
|
VasEBoot_free(desc);
|
|
return ret;
|
|
}
|