commit eeec92431e4a62c424d27697e85f13717c9948d6
Author: Stefan Haller <fgrsnau@gmail.com>
Date: Sat Jan 14 00:35:45 2017 +0000
diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go
index e41baf8..0305975 100644
--- a/bridge/xmpp/xmpp.go
+++ b/bridge/xmpp/xmpp.go
@@ -46 +47 @@ import (
"github.com/42wim/matterbridge/bridge/config"
log "github.com/Sirupsen/logrus"
"github.com/mattn/go-xmpp"
+ "crypto/tls"
"strings"
"time"
@@ -5812 +5916 @@ 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,
diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample
index 2c9a4d3..fe767a2 100644
--- a/matterbridge.toml.sample
+++ b/matterbridge.toml.sample
@@ -976 +9711 @@ Muc="conference.jabber.example.com"
#REQUIRED
Nick="xmppbot"
+#Enable to not verify the certificate on your xmpp server.
+#e.g. when using selfsigned certificates
+#OPTIONAL (default false)
+SkipTLSVerify=true
+
#Nicks you want to ignore.
#Messages from those users will not be sent to other bridges.
#OPTIONAL