Skip to content

Commit

Permalink
Merge pull request #1236 from atc0005/i1235-fix-sans-collection-lengt…
Browse files Browse the repository at this point in the history
…h-check

Fix SANs length check in expiration validation
  • Loading branch information
atc0005 authored Feb 12, 2025
2 parents c459911 + d1f0d16 commit 95eb183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/certs/validation-expiration.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ func (evr ExpirationValidationResult) Status() string {

// but if it is, use the first SubjectAlternateName field in its place
if nextCertToExpire.Subject.CommonName == "" {
if len(nextCertToExpire.DNSNames[0]) > 0 {
if len(nextCertToExpire.DNSNames) > 0 {
nextCertToExpireServerName = nextCertToExpire.DNSNames[0]
}
}
Expand Down

0 comments on commit 95eb183

Please sign in to comment.