func (l *arpaMalformedIP) Execute(c *x509.Certificate) *LintResult {
	for _, name := range c.DNSNames {
		name = strings.ToLower(name)
		var err error
		if strings.HasSuffix(name, rdnsIPv4Suffix) {
			// If the name has the in-addr.arpa suffix then it should be an IPv4 reverse
			// DNS name.
			err = lintReversedIPAddressLabels(name, false)
		} else if strings.HasSuffix(name, rdnsIPv6Suffix) {
			// If the name has the ip6.arpa suffix then it should be an IPv6 reverse
			// DNS name.
			err = lintReversedIPAddressLabels(name, true)
		}
		// Return the first error as a negative lint result
		if err != nil {
			return &LintResult{
				Status:  Warn,
				Details: err.Error(),
			}
		}
	}

	return &LintResult{
		Status: Pass,
	}
}
func (l *arpaMalformedIP) Execute(c *x509.Certificate) *LintResult {
	for _, name := range c.DNSNames {
		name = strings.ToLower(name)
		var err error
		if strings.HasSuffix(name, rdnsIPv4Suffix) {
			
			
			err = lintReversedIPAddressLabels(name, false)
		} else if strings.HasSuffix(name, rdnsIPv6Suffix) {
			
			
			err = lintReversedIPAddressLabels(name, true)
		}
		
		if err != nil {
			return &LintResult{
				Status:  Warn,
				Details: err.Error(),
			}
		}
	}

	return &LintResult{
		Status: Pass,
	}
}
func ( l * arpaMalformedIP ) Execute ( c * x509 . Certificate ) * LintResult { for _ , name := range c . DNSNames { name = strings . ToLower ( name ) var err error if strings . HasSuffix ( name , rdnsIPv4Suffix ) { // If the name has the in-addr.arpa suffix then it should be an IPv4 reverse // DNS name. err = lintReversedIPAddressLabels ( name , false ) } else if strings . HasSuffix ( name , rdnsIPv6Suffix ) { // If the name has the ip6.arpa suffix then it should be an IPv6 reverse // DNS name. err = lintReversedIPAddressLabels ( name , true ) } // Return the first error as a negative lint result if err != nil { return & LintResult { Status : Warn , Details : err . Error ( ) , } } } return & LintResult { Status : Pass , } }
// Execute will check the given certificate to ensure that all of the DNS
// subject alternate names that specify a reverse DNS name under the respective
// IPv4 or IPv6 arpa zones are well formed. A Warn LintResult is returned if
// the name is in a reverse DNS zone but has the wrong number of labels.
Execute will check the given certificate to ensure that all of the DNS subject alternate names that specify a reverse DNS name under the respective IPv4 or IPv6 arpa zones are well formed . A Warn LintResult is returned if the name is in a reverse DNS zone but has the wrong number of labels .