Skip to content

Commit

Permalink
Update internal/certdb/validation.go
Browse files Browse the repository at this point in the history
Co-authored-by: Ghislain Bourgeois <[email protected]>
  • Loading branch information
kayra1 and ghislainbourgeois authored Aug 26, 2024
1 parent 066222d commit c6f5fc8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/certdb/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ func ValidateCertificate(cert string) error {
return fmt.Errorf("invalid certificate chain: certificate %d, certificate %d: keys do not match: %s", i, i+1, err.Error())
}
}
for i := 1; i < len(certificates)-1; i++ {
cert := certificates[i]
for i, cert := range certificates[:len(certificates)-1] {
if !cert.IsCA {
return fmt.Errorf("invalid certificate chain: certificate %d is not a certificate authority", i)
}
Expand Down

0 comments on commit c6f5fc8

Please sign in to comment.