mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-20 05:28:08 +00:00
Use luksHeaderBackup rather than luksDump to measure luks headers.
This commit is contained in:
parent
fba79ab448
commit
b4b0bc4a7a
@ -6,9 +6,13 @@ die() { echo >&2 "$@"; exit 1; }
|
|||||||
|
|
||||||
# Measure the luks headers into PCR 6
|
# Measure the luks headers into PCR 6
|
||||||
for dev in "$@"; do
|
for dev in "$@"; do
|
||||||
cryptsetup luksDump $dev \
|
cryptsetup luksHeaderBackup $dev \
|
||||||
|| die "$dev: Unable to measure"
|
--header-backup-file /tmp/lukshdr-$(echo "$dev" | sed 's/\//_/g') \
|
||||||
done > /tmp/luksDump.txt
|
|| die "$dev: Unable to read luks header"
|
||||||
|
done
|
||||||
|
|
||||||
|
sha256sum /tmp/lukshdr-* > /tmp/luksDump.txt || die "Unable to hash luks headers"
|
||||||
|
rm /tmp/lukshdr-*
|
||||||
|
|
||||||
tpm extend -ix 6 -if /tmp/luksDump.txt \
|
tpm extend -ix 6 -if /tmp/luksDump.txt \
|
||||||
|| die "Unable to extend PCR"
|
|| die "Unable to extend PCR"
|
||||||
|
Loading…
Reference in New Issue
Block a user