-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pre-calculate and sign
PCR 11
values on build (#69)
* feat: pre-calculate PCR11 values during build * feat: support signing of pre-calculated PCR values * fix: replace tabs with spaces * fix: update indentation consistently * chore: code cleanup + add sources * fix: consistent capitalization when using hex values * chore: remove useless tabs * chore: add further comments/sources * chore: remove newline * feat: support PCR signing with AWS KMS keys (WIP) * feat: update certificate path to use specific tpm signing keys + verify digest signature on build * fix: correctly check if keys for signing tpm/secureboot are available * chore: standardize use of the term `tpm2` instead of `tpm` * fix: fixes shellcheck related stuff * fix: fixes more shellcheck related stuff
- Loading branch information
Showing
4 changed files
with
145 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ Before=initrd-root-device.target systemd-fsck-root.service | |
[Service] | ||
ExecStart= | ||
ExecStart=/usr/bin/systemd-repart --root=/ --factory-reset=yes --dry-run=no --tpm2-device=auto --tpm2-pcrs=7+11 $dev_path | ||
ExecStart=/usr/bin/systemd-repart --root=/ --factory-reset=yes --dry-run=no --tpm2-device=auto $dev_path | ||
ExecStartPost=/usr/bin/udevadm settle | ||
EOF | ||
|
||
|
@@ -34,3 +34,10 @@ cat > "$target/etc/systemd/system/[email protected]/override.conf" | |
[Unit] | ||
Before=systemd-repart.service | ||
EOF | ||
|
||
mkdir -p "$target/etc/systemd/system/systemd-pcrphase-initrd.service.d" | ||
cat > "$target/etc/systemd/system/systemd-pcrphase-initrd.service.d/override.conf" << EOF | ||
[Unit] | ||
After=sys-devices-platform-MSFT0101:00-tpm-tpm0.device | ||
Requires=sys-devices-platform-MSFT0101:00-tpm-tpm0.device | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ systemd | |
systemd-ukify | ||
uidmap | ||
xorriso | ||
xxd | ||
xz-utils |