Skip to content

Commit dae25b8

Browse files
committed
Add support for OEM dbx enrollment
1 parent 99e260c commit dae25b8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

cmd/sbctl/enroll-keys.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ func KeySync(guid util.EFIGUID, keydir string, oems []string) error {
137137
}
138138
sigdb.AppendDatabase(oemSigDb)
139139

140+
// dbx
141+
oemSigDbx, err := certs.GetOEMCerts(oem, "dbx")
142+
if err != nil {
143+
return fmt.Errorf("could not enroll db keys: %w", err)
144+
}
145+
sigdbx.AppendDatabase(oemSigDbx)
146+
140147
// KEK
141148
oemSigKEK, err := certs.GetOEMCerts(oem, "KEK")
142149
if err != nil {
@@ -155,6 +162,13 @@ func KeySync(guid util.EFIGUID, keydir string, oems []string) error {
155162
}
156163
sigdb.AppendDatabase(customSigDb)
157164

165+
// dbx
166+
customSigDbx, err := certs.GetCustomCerts(keydir, "dbx")
167+
if err != nil {
168+
return fmt.Errorf("could not enroll custom dbx keys: %w", err)
169+
}
170+
sigdbx.AppendDatabase(customSigDbx)
171+
158172
// KEK
159173
customSigKEK, err := certs.GetCustomCerts(keydir, "KEK")
160174
if err != nil {
@@ -172,6 +186,8 @@ func KeySync(guid util.EFIGUID, keydir string, oems []string) error {
172186
switch cert {
173187
case "db":
174188
sigdb.AppendDatabase(builtinSigDb)
189+
case "dbx":
190+
sigdbx.AppendDatabase(builtinSigDb)
175191
case "KEK":
176192
sigkek.AppendDatabase(builtinSigDb)
177193
case "PK":

0 commit comments

Comments
 (0)