Ldap SSL referral issue

Trying to setup ldap with SSL and get the following error:

Could not follow referral to ldaps://hostX/[hostX’s DN] org.ldaptive.provider.ConnectionException: javax.naming.CommunicationException: hostX:636
[Root exception is javax.net.ssl.SSLHandshakeException: Hostname ‘hostX’
does not match the hostname in the server’s certificate ‘CN=hostY’]

Note that I see a similar topic suggesting that the elasticsearch setting of “follow_referrals” should be exposed, but I do not see that in any of the documentation yet.

Any advice on where to start?

I worked around this issue by setting ‘verify_hostnames’ to false.