diff options
author | Josip Janžić <josip.janzic@gmail.com> | 2017-01-18 21:01:42 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-01-18 21:01:42 +0100 |
commit | 9bf10e4b584d175508aef5b30bc04d4f35ece162 (patch) | |
tree | 56467d3f46ab8e846f1c1caeee94c21897470d30 | |
parent | 884599d27d6206f4936876bd25b94edf5b980b22 (diff) | |
download | matterbridge-msglm-9bf10e4b584d175508aef5b30bc04d4f35ece162.tar.gz matterbridge-msglm-9bf10e4b584d175508aef5b30bc04d4f35ece162.tar.bz2 matterbridge-msglm-9bf10e4b584d175508aef5b30bc04d4f35ece162.zip |
Fix tls by setting ServerName (xmpp) (#114)
Fixes error message shown by tls: "either ServerName or InsecureSkipVerify must be specified in the tls.Config"
-rw-r--r-- | bridge/xmpp/xmpp.go | 1 |
1 files changed, 1 insertions, 0 deletions
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, |