summaryrefslogtreecommitdiffstats
path: root/bridge/xmpp
diff options
context:
space:
mode:
authorStefan Haller <fgrsnau@gmail.com>2017-01-14 00:35:45 +0100
committerWim <wim@42.be>2017-01-14 00:35:45 +0100
commit01a32b21540dd1689b80c4c67c0b686c5ec33dbe (patch)
tree6b13d0173201d41f9a21cbe7a45cceb90147381a /bridge/xmpp
parentb3c3142bb249ad8d959b89f52faff8004deadbd9 (diff)
downloadmatterbridge-msglm-01a32b21540dd1689b80c4c67c0b686c5ec33dbe.tar.gz
matterbridge-msglm-01a32b21540dd1689b80c4c67c0b686c5ec33dbe.tar.bz2
matterbridge-msglm-01a32b21540dd1689b80c4c67c0b686c5ec33dbe.zip
Handle SkipTLSVerify for XMPP client (#106). Closes #81
* Handle SkipTLSVerify for XMPP client * Mention SkipTLSVerify for XMPP in sample config
Diffstat (limited to 'bridge/xmpp')
-rw-r--r--bridge/xmpp/xmpp.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go
index e41baf86..0305975d 100644
--- a/bridge/xmpp/xmpp.go
+++ b/bridge/xmpp/xmpp.go
@@ -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,