Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a75b3fd
feat(boot): add Secure Boot serial needles and swtpm cases
HuntedRaven7 Nov 28, 2026
f1ce962
fix(boot): write serial needles directly to /dev/console
HuntedRaven7 Nov 28, 2026
f267bf2
fix(boot): make Secure Boot cases unlock a provisioned state
HuntedRaven7 Nov 28, 2026
53dcd62
fix(boot): wait for a formatted state partition in the boot harness
HuntedRaven7 Nov 29, 2026
30887c1
fix(boot): provision state with the image's repart definition
HuntedRaven7 Nov 29, 2026
d21130f
ci(boot): install systemd-repart on the runner
HuntedRaven7 Nov 29, 2026
e82f44e
fix(boot): make host repartitioning actually apply
HuntedRaven7 Nov 29, 2026
95265da
fix(boot): use the empty key when provisioning state
HuntedRaven7 Nov 29, 2026
5ce3ac2
fix(boot): let the cases prove the empty-key unlock
HuntedRaven7 Nov 29, 2026
dbb6f17
fix(boot): make first boot non-interactive in the cases
HuntedRaven7 Nov 29, 2026
1b7eb2f
docs(boot): note firstboot credentials in the harness
HuntedRaven7 Nov 29, 2026
46fd286
fix(boot): stage state units in factory /etc
HuntedRaven7 Nov 29, 2026
fe5c5d3
fix(boot): emit the unlock needle at multi-user target
HuntedRaven7 Nov 29, 2026
279f212
fix(boot): restart swtpm for each sequential OVMF case boot
HuntedRaven7 Nov 29, 2026
2ec3f9b
fix(ci): verify downloaded Secure Boot fixtures against SHA256SUMS
HuntedRaven7 Nov 29, 2026
266b0d5
fix(boot): initialize the TPM state before each swtpm case
HuntedRaven7 Nov 29, 2026
a36c8f5
fix(boot): connect QEMU to swtpm's command socket, not its control so…
HuntedRaven7 Nov 29, 2026
d9d238f
Revert "fix(boot): connect QEMU to swtpm's command socket, not its co…
HuntedRaven7 Nov 29, 2026
fc931c9
fix(image): ship tpm2-tss in the runtime root filesystem
HuntedRaven7 Nov 29, 2026
30488e4
fix(boot): use a distinctive needle for state unseal failure
HuntedRaven7 Nov 29, 2026
9c3ee33
fix(boot): copy signed PCR artifacts in the initramfs
HuntedRaven7 Nov 29, 2026
742e6f4
fix(boot): run state enrollment at multi-user.target
HuntedRaven7 Nov 29, 2026
41d5f47
fix(ci): use same-build Secure Boot fixtures in the image gate
HuntedRaven7 Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 47 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,61 @@ jobs:
max-layers: "128"
source-date-epoch: auto

# Generate the unlock fixtures from this build's own signing artifacts.
# The PCR signing key and the measured kernel/initrd/cmdline are
# build-specific, so release assets from another build cannot prove
# that this image's signed PCR 11 policy unseals MjolnirState.
- name: Generate Secure Boot fixtures
run: |
set -euo pipefail
sudo apt-get install -y -qq python3-cryptography ovmf binutils unzip
# Earlier sudo podman steps leave crun's cache under XDG_RUNTIME_DIR
# owned by root, which breaks the unprivileged `just bst` below.
RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
sudo chown -R "$(id -u):$(id -g)" "$RUNTIME_DIR/crun" 2>/dev/null || true
just fixtures

- name: Provision Secure Boot fixtures
env:
FIXTURE_DIR: ${{ github.workspace }}/fixtures-out
run: |
set -euo pipefail
for fixture in OVMF_VARS.enrolled.fd uki-signed.efi uki-unknown.efi; do
test -s "$FIXTURE_DIR/$fixture"
done
(cd "$FIXTURE_DIR" && sha256sum -c SHA256SUMS)

- name: Upload Secure Boot fixtures
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: mjolnir-secureboot-fixtures
path: fixtures-out/
retention-days: 90

# The install checks that bootc accepts the signed digest, and the OVMF
# boot checks that the shell-free initramfs actually mounts the composefs
# root and reaches user space. A static content check cannot prove that.
- name: Install and boot test (OVMF)
env:
FIXTURE_DIR: ${{ github.workspace }}/fixtures-out
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq qemu-system-x86 ovmf binutils
sudo apt-get install -y -qq qemu-system-x86 ovmf binutils swtpm swtpm-tools systemd-repart
just boot-test

- name: Upload Secure Boot serial logs
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: mjolnir-secureboot-serial-logs
path: |
${{ runner.temp }}/mjolnir-boot-test/secureboot-signed.log
${{ runner.temp }}/mjolnir-boot-test/secureboot-unknown.log
${{ runner.temp }}/mjolnir-boot-test/secureboot-*/enroll.log
${{ runner.temp }}/mjolnir-boot-test/secureboot-*/tpm/swtpm.log
if-no-files-found: warn
retention-days: 90

- name: Export image for scanning
run: sudo podman save --format docker-archive -o /tmp/scan-image.tar localhost/mjolnir:latest

Expand Down Expand Up @@ -264,27 +310,6 @@ jobs:
fi
just cache-push

# The unlock fixtures used by Gram's OVMF + swtpm harness. They come
# from the same signing-only artifacts as this image, so uki-signed.efi
# carries the PCR policy that unseals the state of the image built here.
# Generate on every PR so the image gate exercises this code; only the
# publication job below is restricted to testing and manual dispatch.
- name: Generate Secure Boot fixtures
run: |
set -euo pipefail
sudo apt-get install -y -qq python3-cryptography ovmf binutils unzip
# Earlier sudo podman steps leave crun's cache under XDG_RUNTIME_DIR
# owned by root, which breaks the unprivileged `just bst` below.
RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
sudo chown -R "$(id -u):$(id -g)" "$RUNTIME_DIR/crun" 2>/dev/null || true
just fixtures

- name: Upload Secure Boot fixtures
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: mjolnir-secureboot-fixtures
path: fixtures-out/
retention-days: 90

# Publishes the three public fixtures to a stable release tag so Gram's
# curl-based provisioning needs no URL changes. Kept separate from `image`
Expand Down
1 change: 1 addition & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ test:
python3 tests/test_update_pins.py
python3 tests/test_pins.py
python3 tests/test_secureboot_fixtures.py
python3 tests/test_tpm_support.py
python3 tests/test_image_contents.py "{{image_name}}:{{image_tag}}"
python3 tests/test_boot_assets.py "{{image_name}}:{{image_tag}}"

Expand Down
2 changes: 2 additions & 0 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- Network access to `gitlab.com`, `github.com`, `dl.k8s.io`, the FSDK BuildStream
caches and the pinned FSDK `bst2` container image.
- QEMU with KVM for the boot test (optional; requires a real root user namespace).
The Secure Boot cases in `just boot-test` also need `swtpm` and the release
fixtures described in [testsuite/README.md](../testsuite/README.md).

BuildStream itself is not installed on the host. Every `bst` invocation runs
inside the pinned `bst2` container via `just bst`.
Expand Down
8 changes: 8 additions & 0 deletions docs/SECUREBOOT-FIXTURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ in [Gram](https://github.com/HuntedRaven7/Gram) (issue #19). They prove that a
signed UKI update still unseals `MjolnirState`, while a UKI with an unknown PCR
signing key fails the PCR 11 policy.

Mjolnir's own image gate does **not** download these release assets. It
generates fresh fixtures from the same signing artifacts as the image under
test (`just fixtures`) and points `FIXTURE_DIR` at `fixtures-out/`. Dev and CI
builds generate a new PCR signing key and measure a commit-specific kernel,
initramfs and cmdline, so a fixture from another build can never prove this
image's signed PCR 11 policy. The release exists only for the downstream
consumer that provisions against a published image.

## Stable URLs

Set `SECUREBOOT_FIXTURE_BASE_URL` in Gram to:
Expand Down
15 changes: 15 additions & 0 deletions docs/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,21 @@ The initramfs is built with the dracut `crypt` module and the systemd TPM2
cryptsetup token plugin, whose ELF dependencies pull in `tpm2-tss`. It includes
the build-time `/etc/crypttab`.

The unlock outcome has a stable serial contract. `mjolnir-state-unlocked.service`
prints `MjolnirState: unlocked` after `var-lib-mjolnir.mount`. An `OnFailure=`
drop-in on `systemd-cryptsetup@mjolnir-state.service` starts
`mjolnir-state-unseal-failed.service`, which prints `PCR policy`,
`Failed to unseal` and the distinctive `MjolnirState: PCR policy miss` and
`MjolnirState: PCR unseal failed`. The distinctive needles are what the boot
assertions check: systemd-tpm2-setup logs a generic `Failed to unseal` and
systemd-pcrlock logs `Calculated new PCR policy` on a healthy boot. The
drop-in and the failure unit are also sealed into the
initramfs, because a PCR policy miss fails cryptsetup before switch-root. No
key material changes and the PCR 7 plus signed PCR 11 binding is untouched.
`testsuite/boot/test-boot.sh` boots two isolated OVMF plus swtpm cases against
the published signed and unknown-key UKIs and asserts those needles; see
[testsuite/README.md](../testsuite/README.md) for the fixture contract.

## Factory reset

`io.mjolnir.Fleet.FactoryReset` requires a `scope`
Expand Down
3 changes: 3 additions & 0 deletions elements/base/os-stack.bst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ depends:
- freedesktop-sdk.bst:integration/ldconfig.bst

- freedesktop-sdk.bst:components/systemd.bst
# systemd's TPM2 units need tpm2-tss after switch-root, not just in the
# initramfs where the cryptsetup token plugin pulls it in.
- freedesktop-sdk.bst:components/tpm2-tss.bst
- freedesktop-sdk.bst:components/dbus.bst
- freedesktop-sdk.bst:components/dbus-broker.bst
- freedesktop-sdk.bst:components/kmod.bst
Expand Down
19 changes: 19 additions & 0 deletions elements/config/files.bst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ config:
"${root}/usr/lib/tmpfiles.d/mjolnir-volatile.conf"
install -Dm644 /config/systemd/var-lib-mjolnir.mount \
"${root}/usr/lib/systemd/system/var-lib-mjolnir.mount"
# The cryptsetup instance drop-in lives in a directory, so the *.service
# glob below does not copy it. The initramfs stages its own copy.
install -Dm644 /config/systemd/systemd-cryptsetup@mjolnir-state.service.d/10-mjolnir-failure.conf \
"${root}/usr/lib/systemd/system/systemd-cryptsetup@mjolnir-state.service.d/10-mjolnir-failure.conf"
for m in var-lib-mjolnir var-lib-etcd etc-machine-id \
etc-NetworkManager-system-connections \
var-lib-containerd var-lib-kubelet var-log-journal var-lib-cni \
Expand All @@ -56,6 +60,21 @@ config:
install -Dm644 /config/crictl.yaml "${root}/etc/crictl.yaml"
install -Dm644 /config/presets/80-mjolnir.preset \
"${root}/usr/lib/systemd/system-preset/80-mjolnir.preset"
# systemd.volatile=yes seeds /etc from /usr/share/factory/etc on every
# boot. Preset symlinks created once the manager starts are too late for
# local-fs.target's initial transaction, so stage the state wants here as
# well; otherwise var-lib-mjolnir.mount and the needle units never run.
mkdir -p "${root}/usr/share/factory/etc/systemd/system/local-fs.target.wants" \
"${root}/usr/share/factory/etc/systemd/system/multi-user.target.wants"
ln -sf /usr/lib/systemd/system/var-lib-mjolnir.mount \
"${root}/usr/share/factory/etc/systemd/system/local-fs.target.wants/var-lib-mjolnir.mount"
# Enrollment runs at multi-user.target, like the unlock needle. Preset
# symlinks appear after local-fs.target's initial transaction, so an
# enroll unit wanted by local-fs.target never started.
for u in mjolnir-state-enroll.service mjolnir-state-unlocked.service; do
ln -sf "/usr/lib/systemd/system/${u}" \
"${root}/usr/share/factory/etc/systemd/system/multi-user.target.wants/${u}"
done
mkdir -p "${root}/usr/lib/systemd/system"
cp /config/systemd/*.service /config/systemd/*.socket /config/systemd/*.timer \
"${root}/usr/lib/systemd/system/" 2>/dev/null || true
Expand Down
18 changes: 18 additions & 0 deletions elements/kernel/initramfs.bst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ config:
install -Dm644 /config/crypttab /etc/crypttab
install -Dm644 /config/dracut/50-mjolnir-tpm2.conf \
/etc/dracut.conf.d/50-mjolnir-tpm2.conf
install -Dm644 /config/tmpfiles.d/mjolnir-initrd-pcr.conf \
/usr/lib/tmpfiles.d/mjolnir-initrd-pcr.conf
# The PCR policy failure is reported by an OnFailure drop-in on the
# cryptsetup instance. Stage both files for dracut's install_items so the
# wires exist in the initramfs, not just in the booted rootfs.
install -Dm644 /config/systemd/mjolnir-state-unseal-failed.service \
/usr/lib/systemd/system/mjolnir-state-unseal-failed.service
install -Dm644 /config/systemd/systemd-cryptsetup@mjolnir-state.service.d/10-mjolnir-failure.conf \
/usr/lib/systemd/system/systemd-cryptsetup@mjolnir-state.service.d/10-mjolnir-failure.conf
# FSDK installs shared libraries in the multiarch libdir but ships an empty
# /etc/ld.so.conf. dracut-install resolves DT_NEEDED from that file plus
# /lib and /usr/lib, so with an empty config the initramfs contains no libc
Expand Down Expand Up @@ -132,6 +141,15 @@ config:
exit 1
}
done
# Prove the PCR failure report travels with the initramfs. A drop-in in
# the rootfs alone cannot fire before switch-root.
for f in usr/lib/systemd/system/mjolnir-state-unseal-failed.service \
10-mjolnir-failure.conf usr/bin/echo; do
lsinitrd /initramfs.img | grep -q "$f" || {
echo "initramfs is missing the PCR failure reporter: $f" >&2
exit 1
}
done
install -Dm644 /initramfs.img \
"%{install-root}/usr/lib/modules/${version}/initramfs.img"
depmod -b "%{install-root}/usr" -a "${version}"
Expand Down
9 changes: 9 additions & 0 deletions files/config/dracut/50-mjolnir-tpm2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
add_dracutmodules+=" crypt "
install_items+=" /etc/crypttab "
install_optional_items+=" /usr/lib/cryptsetup/libcryptsetup-token-systemd-tpm2.so "
# A PCR policy miss fails cryptsetup in the initramfs, so the failure report
# and its OnFailure drop-in must be present before switch-root. echo is a
# compiled binary; no shell or interpreter enters the initramfs.
install_items+=" /usr/lib/systemd/system/mjolnir-state-unseal-failed.service "
install_items+=" /usr/lib/systemd/system/systemd-cryptsetup@mjolnir-state.service.d/10-mjolnir-failure.conf "
install_items+=" /usr/bin/echo "
# Copy the stub's signed PCR artifacts into /run/systemd before switch-root;
# the enroll unit cannot find them after /.extra/ disappears.
install_items+=" /usr/lib/tmpfiles.d/mjolnir-initrd-pcr.conf "
1 change: 1 addition & 0 deletions files/config/presets/80-mjolnir.preset
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ enable mjolnir-join.service
enable mjolnir-apply.service
enable varlink-httpd.socket
enable mjolnir-state-enroll.service
enable mjolnir-state-unlocked.service
enable mjolnir-etcd-snapshot.timer
enable NetworkManager.service
enable systemd-resolved.service
Expand Down
2 changes: 1 addition & 1 deletion files/config/systemd/mjolnir-state-enroll.service
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ReadOnlyPaths=/
ReadWritePaths=/var/lib/mjolnir /run/systemd

[Install]
WantedBy=local-fs.target
WantedBy=multi-user.target
22 changes: 22 additions & 0 deletions files/config/systemd/mjolnir-state-unlocked.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[Unit]
Description=Report MjolnirState unlock on the serial console
DefaultDependencies=no
# local-fs.target is reached before preset/factory wants symlinks take effect
# under systemd.volatile=yes. multi-user.target is late enough, and the
# decrypted mapping is the actual proof that the state key unsealed.
After=systemd-cryptsetup@mjolnir-state.service
ConditionPathExists=/dev/disk/by-label/MjolnirState

[Service]
Type=oneshot
RemainAfterExit=yes
# `console` alone is not a valid systemd output specifier: systemd rejects it
# and silently falls back to the journal, which loses the needle on serial.
# `journal+console` is valid and the signed cmdline enables journald console
# forwarding, so the echo reaches ttyS0.
ExecStart=/usr/bin/echo MjolnirState: unlocked
StandardOutput=journal+console
StandardError=journal+console

[Install]
WantedBy=multi-user.target
19 changes: 19 additions & 0 deletions files/config/systemd/mjolnir-state-unseal-failed.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Unit]
Description=Report a TPM2 PCR policy unseal failure on the serial console
DefaultDependencies=no

[Service]
Type=oneshot
# The failure happens in the initramfs, before switch-root. `console` alone is
# not a valid systemd output specifier, so use `journal+console`: journald is
# running in the initramfs and the signed cmdline forwards it to ttyS0.
ExecStart=/usr/bin/echo PCR policy
ExecStart=/usr/bin/echo Failed to unseal
# Distinctive needles: systemd-tpm2-setup logs "Failed to unseal" and
# systemd-pcrlock logs "Calculated new PCR policy" on a healthy boot, so the
# assertions must not match those generic strings. Keep the two lines above
# for the downstream consumer that greps them.
ExecStart=/usr/bin/echo MjolnirState: PCR policy miss
ExecStart=/usr/bin/echo MjolnirState: PCR unseal failed
StandardOutput=journal+console
StandardError=journal+console
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Unit]
# A PCR policy miss fails the cryptsetup unit in the initramfs. The drop-in is
# installed in both the rootfs and the initramfs so the report fires before and
# after switch-root.
OnFailure=mjolnir-state-unseal-failed.service
6 changes: 6 additions & 0 deletions files/config/tmpfiles.d/mjolnir-initrd-pcr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# systemd-stub exposes the signed PCR artifacts in the initrd at /.extra/.
# Copy them to the paths systemd-cryptenroll searches before switch-root;
# after switch-root the /.extra/ source is gone. The rootfs has the same
# lines in mjolnir-volatile.conf for the case where the artifacts persist.
C /run/systemd/tpm2-pcr-signature.json - - - - /.extra/tpm2-pcr-signature.json
C /run/systemd/tpm2-pcr-public-key.pem - - - - /.extra/tpm2-pcr-public-key.pem
3 changes: 3 additions & 0 deletions tests/test_boot_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"/usr/lib/repart.d/20-mjolnir-state.conf",
"/etc/crypttab",
"/usr/lib/systemd/system/mjolnir-state-enroll.service",
"/usr/lib/systemd/system/mjolnir-state-unlocked.service",
"/usr/lib/systemd/system/mjolnir-state-unseal-failed.service",
"/usr/lib/systemd/system/systemd-cryptsetup@mjolnir-state.service.d/10-mjolnir-failure.conf",
"/usr/lib/systemd/system/mjolnir-reset-node-identity.service",
"/usr/lib/systemd/system/mjolnir-reset-etcd-data.service",
"/usr/lib/systemd/system/mjolnir-reset-full.service",
Expand Down
8 changes: 8 additions & 0 deletions tests/test_secureboot_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ def main() -> int:
generate_block = generate_block.split(" - name: Upload Secure Boot fixtures", 1)[0]
if "if:" in generate_block:
errors.append("fixture generation must run on PRs so the image gate exercises it")
provision_block = workflow.split(" - name: Provision Secure Boot fixtures", 1)[1]
provision_block = provision_block.split(" # The install checks", 1)[0]
if "fixtures-out" not in provision_block:
errors.append("the image gate does not use this build's generated fixtures")
if "FIXTURE_BASE_URL" in provision_block:
errors.append("the image gate must not consume stale release fixtures")
if "SHA256SUMS" not in provision_block or "sha256sum -c" not in provision_block:
errors.append("generated fixtures are not verified against SHA256SUMS")

docs = read("docs/SECUREBOOT-FIXTURES.md")
if BASE_URL not in docs or not all(f in docs for f in ASSETS):
Expand Down
54 changes: 54 additions & 0 deletions tests/test_tpm_support.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
"""Assert the TPM2 userspace libraries are available in both boot stages.

FSDK's systemd element does not runtime-depend on tpm2-tss. The initramfs
needs it for the cryptsetup token plugin, and the booted root needs it for
systemd-pcrlock, systemd-tpm2-setup and systemd-cryptenroll. A missing copy in
the root turns TPM-backed state enrollment into a silent fallback to the
empty-key LUKS slot, which the Secure Boot cases cannot distinguish.
"""
from __future__ import annotations

from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent


def main() -> int:
errors: list[str] = []
rootfs = (ROOT / "elements/base/os-stack.bst").read_text()
if "freedesktop-sdk.bst:components/tpm2-tss.bst" not in rootfs:
errors.append("tpm2-tss is missing from the runtime stack")

initramfs = (ROOT / "elements/kernel/initramfs.bst").read_text()
if "freedesktop-sdk.bst:components/tpm2-tss.bst" not in initramfs:
errors.append("tpm2-tss is missing from the initramfs stack")

dracut = (ROOT / "files/config/dracut/50-mjolnir-tpm2.conf").read_text()
if "libcryptsetup-token-systemd-tpm2.so" not in dracut:
errors.append("initramfs has no systemd TPM2 cryptsetup token plugin")
if "mjolnir-initrd-pcr.conf" not in dracut:
errors.append("initramfs does not install the PCR artifact tmpfiles rule")

initrd_pcr = (ROOT / "files/config/tmpfiles.d/mjolnir-initrd-pcr.conf")
if not initrd_pcr.is_file():
errors.append("missing initramfs PCR artifact tmpfiles rule")
else:
text = initrd_pcr.read_text()
if "/.extra/tpm2-pcr-signature.json" not in text:
errors.append("initramfs rule does not copy the PCR signature")

initramfs = (ROOT / "elements/kernel/initramfs.bst").read_text()
if "mjolnir-initrd-pcr.conf" not in initramfs:
errors.append("initramfs element does not stage the PCR tmpfiles rule")

if errors:
for error in errors:
print(f" - {error}")
raise SystemExit(1)
print("TPM2 userspace contract OK")
return 0


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading