From b40e1294994db64811ad7cbed095b57146f3d202 Mon Sep 17 00:00:00 2001 From: marzzzello <15198431+marzzzello@users.noreply.github.com> Date: Thu, 21 Jan 2021 09:27:23 +0100 Subject: [PATCH] use ServerName to verify tls hostname (#127) --- xmpp.go | 1 + 1 file changed, 1 insertion(+) diff --git a/xmpp.go b/xmpp.go index 281f123..52f6be1 100644 --- a/xmpp.go +++ b/xmpp.go @@ -241,6 +241,7 @@ func (o Options) NewClient() (*Client, error) { var tlsconn *tls.Conn if o.TLSConfig != nil { tlsconn = tls.Client(c, o.TLSConfig) + host = o.TLSConfig.ServerName } else { newconfig := DefaultConfig.Clone() newconfig.ServerName = host