pcrlock: don't fail if firmware measurements aren't available
With swtpm in place we now commonly have systems where TPM is available during runtime, but not in the firmware. Handle that nicely.
This commit is contained in:
@@ -899,6 +899,10 @@ static int event_log_load_firmware(EventLog *el) {
|
||||
path = tpm2_firmware_log_path();
|
||||
|
||||
r = read_full_file(path, (char**) &buf, &bufsize);
|
||||
if (r == -ENOENT) {
|
||||
log_notice("No '%s' file, assuming TPM without firmware support.", path);
|
||||
return 0;
|
||||
}
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to open TPM2 event log '%s': %m", path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user