Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extra KEK/db keys #279

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ uki-byok:
RUN apt-get update && apt-get install -y efitools curl
COPY +download-sbctl/sbctl /usr/bin/sbctl
COPY --if-exists secure-boot/exported-keys/ /exported-keys
COPY --if-exists secure-boot/extra-KEK-keys/ /usr/share/secureboot/keys/custom/KEK/
COPY --if-exists secure-boot/extra-db-keys/ /usr/share/secureboot/keys/custom/db/
COPY secure-boot/private-keys/ secure-boot/public-keys /keys
WORKDIR /keys
RUN sbctl import-keys \
Expand All @@ -430,9 +432,9 @@ uki-byok:
--db-cert /keys/db.pem
RUN sbctl create-keys
IF [ "$INCLUDE_MS_SECUREBOOT_KEYS" = "false" ]
RUN sbctl enroll-keys --export esl --yes-this-might-brick-my-machine
RUN sbctl enroll-keys --custom --export esl --yes-this-might-brick-my-machine
ELSE
RUN sbctl enroll-keys --export esl --yes-this-might-brick-my-machine --microsoft
RUN sbctl enroll-keys --custom --export esl --yes-this-might-brick-my-machine --microsoft
END
RUN mkdir -p /output
RUN cp PK.esl /output/PK.esl 2>/dev/null
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,19 @@ secure-boot/
| | PK.pem
```

Optionally, you can add additional public keys to be added to the KEK and/or db database, by placing them in the following directories:
```shell
secure-boot/
| extra-KEK-keys <-- extra KEK keys to include, can be any filename, supports PEM and DER certificates
| | key1.pem
| | key2.pem
| | ...
| extra-db-keys <-- extra db keys to include, can be any filename, supports PEM and DER certificates
| | key1.pem
| | key2.pem
| | ...
```

3. Generate keys for Trusted Boot

```shell
Expand Down