While we're at it, let's ensure VerifyCertExtensions can't be tricked the same way.
This commit is contained in:
parent
aaea0166e2
commit
28c2308458
1 changed files with 8 additions and 1 deletions
|
|
@ -16,12 +16,19 @@ func VerifyCertExtensions(results []*AttestationProcessingResult, tenant, owner,
|
|||
return errors.New("no attestations proccessing results")
|
||||
}
|
||||
|
||||
var atLeastOneVerified bool
|
||||
for _, attestation := range results {
|
||||
if err := verifyCertExtensions(attestation, tenant, owner, repo, issuer); err != nil {
|
||||
return err
|
||||
}
|
||||
atLeastOneVerified = true
|
||||
}
|
||||
|
||||
if atLeastOneVerified {
|
||||
return nil
|
||||
} else {
|
||||
return ErrNoAttestationsVerified
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func verifyCertExtensions(attestation *AttestationProcessingResult, tenant, owner, repo, issuer string) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue