From e68107113bee113e767438d5dc558789cd0a3290 Mon Sep 17 00:00:00 2001 From: Simon Ott Date: Thu, 30 May 2024 11:57:38 +0000 Subject: [PATCH] attestationreport: allow unknown provers Set the prover name to unknown if it cannot be extracted from the app description. Signed-off-by: Simon Ott --- attestationreport/attestationreport.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/attestationreport/attestationreport.go b/attestationreport/attestationreport.go index 281dbe07..1d6ff9c9 100644 --- a/attestationreport/attestationreport.go +++ b/attestationreport/attestationreport.go @@ -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 }