diff --git a/pkg/nsx/cluster.go b/pkg/nsx/cluster.go index 8756e2a9d..4e9a4c4da 100644 --- a/pkg/nsx/cluster.go +++ b/pkg/nsx/cluster.go @@ -170,7 +170,8 @@ func (cluster *Cluster) createTransport(idle time.Duration) *Transport { RootCAs: certPool, } // Bypass CN / SAN verification by setting tls config ServerName to the one in cert - if cn, err := util.GetCommonNameFromLeafCert(caCert); err != nil { + if cn, err := util.GetCommonNameFromLeafCert(caCert); err == nil { + log.Info("pinned common name for manager", "cn", cn, "addr", addr) config.ServerName = cn } } else {