Skip to content

Commit

Permalink
tpm: skip adding bytes if they already exists
Browse files Browse the repository at this point in the history
Fixes: #384

Signed-off-by: Morten Linderud <[email protected]>
  • Loading branch information
Foxboron committed Oct 17, 2024
1 parent 19c6f7a commit 7863196
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func GetEventlogChecksums(vfs afero.Fs, eventlog string) (*signature.SignatureDa
for _, event := range events {
switch event.Type.String() {
case "EV_EFI_BOOT_SERVICES_DRIVER":
if sigdb.BytesExists(signature.CERT_SHA256_GUID, eventlogGUID, event.Digest) {

Check failure on line 65 in tpm.go

View workflow job for this annotation

GitHub Actions / Build binaries (linux, amd64)

sigdb.BytesExists undefined (type *signature.SignatureDatabase has no field or method BytesExists)

Check failure on line 65 in tpm.go

View workflow job for this annotation

GitHub Actions / Build binaries (linux, arm, 6)

sigdb.BytesExists undefined (type *signature.SignatureDatabase has no field or method BytesExists)

Check failure on line 65 in tpm.go

View workflow job for this annotation

GitHub Actions / Build binaries (linux, arm64)

sigdb.BytesExists undefined (type *signature.SignatureDatabase has no field or method BytesExists)
continue
}
if err = sigdb.Append(signature.CERT_SHA256_GUID, eventlogGUID, event.Digest); err != nil {
return nil, err
}
Expand Down

0 comments on commit 7863196

Please sign in to comment.