Skip to content

Commit b5072cb

Browse files
authored
Merge pull request #1237 from atc0005/i1235-fix-sans-collection-length-check-dev-branch
Fix SANs length check in expiration validation
2 parents a6532ca + 4aa1ae6 commit b5072cb

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
@@ -727,7 +727,7 @@ func (evr ExpirationValidationResult) Status() string {
727727

728728
// but if it is, use the first SubjectAlternateName field in its place
729729
if nextCertToExpire.Subject.CommonName == "" {
730-
if len(nextCertToExpire.DNSNames[0]) > 0 {
730+
if len(nextCertToExpire.DNSNames) > 0 {
731731
nextCertToExpireServerName = nextCertToExpire.DNSNames[0]
732732
}
733733
}

0 commit comments

Comments
 (0)