tpm2-util: add helper for returning path to EFI event log blob

This commit is contained in:
Lennart Poettering
2023-11-03 11:20:11 +01:00
parent a63b260166
commit f88f929470
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -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;
+1
View File
@@ -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,