Skip to content

Commit 95eb183

Browse files
authored
Merge pull request #1236 from atc0005/i1235-fix-sans-collection-length-check
Fix SANs length check in expiration validation
2 parents c459911 + d1f0d16 commit 95eb183

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/certs/validation-expiration.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ func (evr ExpirationValidationResult) Status() string {
706706

707707
// but if it is, use the first SubjectAlternateName field in its place
708708
if nextCertToExpire.Subject.CommonName == "" {
709-
if len(nextCertToExpire.DNSNames[0]) > 0 {
709+
if len(nextCertToExpire.DNSNames) > 0 {
710710
nextCertToExpireServerName = nextCertToExpire.DNSNames[0]
711711
}
712712
}

0 commit comments

Comments
 (0)