Skip to content

Commit

Permalink
Merge pull request #130 from shjala/fix_panic_no_onboard_serial
Browse files Browse the repository at this point in the history
Don't panic if there is no onboard cert
  • Loading branch information
deitch authored Dec 2, 2024
2 parents 05e757f + 2524166 commit 7813c42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/driver/file/device_manager_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,9 @@ func (d *DeviceManager) checkValidOnboardSerial(cert *x509.Certificate, serial s
func (d *DeviceManager) getOnboardSerialDevice(cert *x509.Certificate, serial string) *uuid.UUID {
certStr := string(cert.Raw)
for uid, dev := range d.devices {
if dev.Onboard == nil {
continue
}
dCertStr := string(dev.Onboard.Raw)
if dCertStr == certStr && serial == dev.Serial {
return &uid
Expand Down

0 comments on commit 7813c42

Please sign in to comment.