We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fba79ab commit eb3ee36Copy full SHA for eb3ee36
1 file changed
initrd/bin/qubes-measure-luks
@@ -4,11 +4,18 @@
4
5
die() { echo >&2 "$@"; exit 1; }
6
7
+#Following file should be clean since the actual script is called to populate /tmp/luksDump.txt
8
+# /tmp/luksDump.txt is then used kexec-seal-key to calcfuturepcr into pcr 10 (unused)
9
+# and then extend that clean value into PCR 6 (which should be zeroed too).
10
+rm -f /tmp/luksDump.txt
11
+
12
# Measure the luks headers into PCR 6
13
for dev in "$@"; do
- cryptsetup luksDump $dev \
14
+ cryptsetup luksHeaderBackup $dev --header-backup-file /tmp/tmp_luks_header \
15
|| die "$dev: Unable to measure"
-done > /tmp/luksDump.txt
16
+ cat /tmp/tmp_luks_header >> /tmp/luksDump.txt
17
+ rm -f /tmp/tmp_luks_header
18
+done
19
20
tpm extend -ix 6 -if /tmp/luksDump.txt \
21
|| die "Unable to extend PCR"
0 commit comments