From 9bf10e4b584d175508aef5b30bc04d4f35ece162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Jan=C5=BEi=C4=87?= Date: Wed, 18 Jan 2017 21:01:42 +0100 Subject: [PATCH] Fix tls by setting ServerName (xmpp) (#114) Fixes error message shown by tls: "either ServerName or InsecureSkipVerify must be specified in the tls.Config" --- bridge/xmpp/xmpp.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index 0305975d..8899e718 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -61,6 +61,7 @@ func (b *Bxmpp) Send(msg config.Message) error { func (b *Bxmpp) createXMPP() (*xmpp.Client, error) { tc := new(tls.Config) tc.InsecureSkipVerify = b.Config.SkipTLSVerify + tc.ServerName = strings.Split(b.Config.Server, ":")[0] options := xmpp.Options{ Host: b.Config.Server, User: b.Config.Jid,