mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-30 08:03:55 +00:00
kexec-save-default: Always update TPM2 primary object handle hash
Resetting the TPM creates a new primary object, and there is no reason for kexec-save-default to sign an old hash. Always update the hash instead of creating it only if it doesn't exist. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
parent
ff8ec2fd5b
commit
55a41c3fdb
@ -125,10 +125,8 @@ if [ ! -d $paramsdir ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CONFIG_TPM2_TOOLS" = "y" ]; then
|
if [ "$CONFIG_TPM2_TOOLS" = "y" ]; then
|
||||||
if [ ! -r "$PRIMHASH_FILE" ]; then
|
sha256sum /tmp/primary.handle > "$PRIMHASH_FILE" \
|
||||||
sha256sum /tmp/primary.handle > "$PRIMHASH_FILE" \
|
|| die "ERROR: Failed to Hash TPM2 primary key handle!"
|
||||||
|| die "ERROR: Failed to Hash TPM2 primary key handle!"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm $paramsdir/kexec_default.*.txt 2>/dev/null || true
|
rm $paramsdir/kexec_default.*.txt 2>/dev/null || true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user