5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 18:25:40 +00:00

Fix tls by setting ServerName (xmpp) (#114)

Fixes error message shown by tls: "either ServerName or InsecureSkipVerify must be specified in the tls.Config"
This commit is contained in:
Josip Janžić 2017-01-18 21:01:42 +01:00 committed by Wim
parent 884599d27d
commit 9bf10e4b58

View File

@ -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,