tpm2-util: add helper for returning path to EFI event log blob
This commit is contained in:
@@ -4487,6 +4487,10 @@ const char *tpm2_userspace_log_path(void) {
|
||||
return secure_getenv("SYSTEMD_MEASURE_LOG_USERSPACE") ?: "/run/log/systemd/tpm2-measure.log";
|
||||
}
|
||||
|
||||
const char *tpm2_firmware_log_path(void) {
|
||||
return secure_getenv("SYSTEMD_MEASURE_LOG_FIRMWARE") ?: "/sys/kernel/security/tpm0/binary_bios_measurements";
|
||||
}
|
||||
|
||||
#if HAVE_OPENSSL
|
||||
static int tpm2_userspace_log_open(void) {
|
||||
_cleanup_close_ int fd = -EBADF;
|
||||
|
||||
@@ -126,6 +126,7 @@ int tpm2_get_good_pcr_banks_strv(Tpm2Context *c, uint32_t pcr_mask, char ***ret)
|
||||
int tpm2_get_best_pcr_bank(Tpm2Context *c, uint32_t pcr_mask, TPMI_ALG_HASH *ret);
|
||||
|
||||
const char *tpm2_userspace_log_path(void);
|
||||
const char *tpm2_firmware_log_path(void);
|
||||
|
||||
typedef enum Tpm2UserspaceEventType {
|
||||
TPM2_EVENT_PHASE,
|
||||
|
||||
Reference in New Issue
Block a user