Skip to content

Commit 3cdef81

Browse files
committed
update pcr ids, always use same keyslot
1 parent 247b7bb commit 3cdef81

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.19.0
1+
v0.20.0

scripts/install-unlock-drive-tpm.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
DEVICE=""
55
DRIVE_PASSWORD=""
6-
PCR_IDS="1,3,5,7,11,12,14,15"
6+
PCR_IDS="1,5,7"
77
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
88

99
# help message
@@ -59,6 +59,9 @@ if [[ -z "$BOOT_LUKS" ]]; then
5959
exit 1
6060
fi
6161
"${SCRIPT_DIR}/device-run-command.sh" --device "$DEVICE" --command \
62-
"echo '$DRIVE_PASSWORD' | \
63-
clevis luks bind -k - \
64-
-d '$BOOT_LUKS' tpm2 '{\"pcr_bank\":\"sha256\",\"pcr_ids\":\"${PCR_IDS}\"}'"
62+
"cryptsetup luksKillSlot '$BOOT_LUKS' 5 || true \
63+
&& cryptsetup token remove '$BOOT_LUKS' --token-id 5 || true \
64+
&& echo '$DRIVE_PASSWORD' \
65+
| clevis luks bind -s 5 -t 5 -k - \
66+
-d '$BOOT_LUKS' tpm2 '{\"pcr_bank\":\"sha256\",\"pcr_ids\":\"${PCR_IDS}\"}'\
67+
&& tpm2_pcrread sha256 > /root/.configured-tpm2-pcr-values"

0 commit comments

Comments
 (0)