4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 16:39:24 +00:00

Handle SkipTLSVerify for XMPP client (#106). Closes #81

* Handle SkipTLSVerify for XMPP client

* Mention SkipTLSVerify for XMPP in sample config
This commit is contained in:
Stefan Haller
2017-01-14 00:35:45 +01:00
committed by Wim
parent b3c3142bb2
commit 01a32b2154
2 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"github.com/42wim/matterbridge/bridge/config"
log "github.com/Sirupsen/logrus"
"github.com/mattn/go-xmpp"
"crypto/tls"
"strings"
"time"
@ -58,12 +59,16 @@ func (b *Bxmpp) Send(msg config.Message) error {
}
func (b *Bxmpp) createXMPP() (*xmpp.Client, error) {
tc := new(tls.Config)
tc.InsecureSkipVerify = b.Config.SkipTLSVerify
options := xmpp.Options{
Host: b.Config.Server,
User: b.Config.Jid,
Password: b.Config.Password,
NoTLS: true,
StartTLS: true,
TLSConfig: tc,
//StartTLS: false,
Debug: true,
Session: true,