From 9bf10e4b584d175508aef5b30bc04d4f35ece162 Mon Sep 17 00:00:00 2001 From: Josip Janžić Date: Wed, 18 Jan 2017 21:01:42 +0100 Subject: 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(+) (limited to 'bridge/xmpp') 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, -- cgit v1.2.3