diff --git a/pkg/utils/cert/hostname.go b/pkg/utils/cert/hostname.go index af4ae5d9a..722a6418c 100644 --- a/pkg/utils/cert/hostname.go +++ b/pkg/utils/cert/hostname.go @@ -24,7 +24,7 @@ func MatchHostname(match, candidate string) bool { } mockCert := &x509.Certificate{} - if ip := net.ParseIP(candidate); ip != nil { + if ip := net.ParseIP(match); ip != nil { mockCert.IPAddresses = []net.IP{ip} } else { mockCert.DNSNames = []string{match}