Describe the bug
If you connect to a broker using a https lookup url, and the cert doesn't match the hostname, and hostname verification is disabled, it will complain about the hostname.
To Reproduce
Steps to reproduce the behavior:
- Configure a cluster with TLS authentication. The broker hostname shouldn't match the cert CN.
PulsarClient.builder()
.serviceUrl("https://BROKER_HOSTNAME:8443")
.enableTlsHostnameVerification(false)
.authentication("org.apache.pulsar.client.impl.auth.AuthenticationTls",
"tlsCertFile:PATH_TO_CERT,tlsKeyFile:PATH_TO_KEY")
.tlsTrustCertsFilePath(PATH_TO_CA).build();
- The client will fail to connect and give an error about the hostname.
Expected behavior
It shouldn't try to verify the hostname.