Skip to content

Commit

Permalink
attestationreport: allow unknown provers
Browse files Browse the repository at this point in the history
Set the prover name to unknown if it cannot be extracted
from the app description.

Signed-off-by: Simon Ott <[email protected]>
  • Loading branch information
smo4201 committed Jun 4, 2024
1 parent 77444da commit e681071
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion attestationreport/attestationreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,16 @@ func Verify(arRaw, nonce, casPem []byte, policies []byte, polEng PolicyEngineSel

// Add additional information
result.Prover = metadata.DeviceDescription.Name
if result.Prover == "" {
result.Prover = "Unknown"
}
result.Created = time.Now().Format(time.RFC3339)

log.Tracef("Verification Result: %v", result.Success)
if result.Success {
log.Infof("SUCCESS: Verification for Prover %v (%v)", result.Prover, result.Created)
} else {
log.Infof("FAILED: Verification for Prover %v (%v)", result.Prover, result.Created)
}

return result
}
Expand Down

0 comments on commit e681071

Please sign in to comment.