Skip to content

Commit 8588839

Browse files
committed
sealing: Add GUID.txt for bcvk firmware enrollment
bcvk requires a GUID.txt file in the keys directory for Secure Boot variable enrollment. Generate one in CI and in keys.py. Assisted-by: OpenCode (Claude Opus 4)
1 parent c768bd9 commit 8588839

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/e2e-sealing.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
set -euo pipefail
2929
mkdir -p sealing/target/keys sealing/keys/
3030
31+
uuidgen > sealing/target/keys/GUID.txt
32+
3133
for name in PK KEK db; do
3234
openssl req -new -x509 -newkey rsa:2048 -nodes \
3335
-keyout "sealing/target/keys/sb-${name}.key" \
@@ -126,6 +128,8 @@ jobs:
126128
set -euo pipefail
127129
mkdir -p /tmp/keys
128130
131+
uuidgen > /tmp/keys/GUID.txt
132+
129133
# Secure Boot keys
130134
for name in PK KEK db; do
131135
openssl req -new -x509 -newkey rsa:2048 -nodes \

sealing/util/keys.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import argparse
1616
import subprocess
1717
import sys
18+
import uuid
1819
from pathlib import Path
1920

2021
DEFAULT_KEYS_DIR = "target/keys"
@@ -61,6 +62,12 @@ def generate_keys(output_dir: Path):
6162
f"/CN={cn}",
6263
)
6364

65+
# GUID (required by bcvk for firmware enrollment)
66+
guid_file = output_dir / "GUID.txt"
67+
if not guid_file.exists():
68+
guid_file.write_text(str(uuid.uuid4()) + "\n")
69+
print(f" create GUID.txt")
70+
6471
# Create bcvk-compatible symlinks (bcvk expects PK.crt, not sb-PK.crt)
6572
for name in ("PK", "KEK", "db"):
6673
for ext in ("key", "crt"):

0 commit comments

Comments
 (0)