Skip to content

Commit

Permalink
Merge pull request #264 from veraison/arm-cca-plugin-no-platform-conf…
Browse files Browse the repository at this point in the history
…ig-fix

fix(scheme): handle the case when no platform configuration RV is given
  • Loading branch information
yogeshbdeshpande authored Aug 29, 2024
2 parents 4f50718 + 42fa0d3 commit f07c94e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scheme/common/arm/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,17 @@ func MatchPlatformConfig(scheme string, evidence psatoken.IClaims, endorsements
if err != nil {
return false
}
if len(endorsements) > 1 {
log.Errorf("got %d CCA configuration endorsements, want 1", len(endorsements))

endorsementsLen := len(endorsements)

switch endorsementsLen {
case 0:
log.Debugf("got no CCA configuration endorsement, accepting unconditionally")
return true
case 1:
break
default:
log.Errorf("got %d CCA configuration endorsements, want 1", endorsementsLen)
return false
}

Expand Down

0 comments on commit f07c94e

Please sign in to comment.