diff options
-rw-r--r-- | xmpp.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2,7 +2,8 @@ package main import ( "log" - "net" + "crypto/tls" + "crypto/x509" ) type XmppEvent uint8 @@ -18,14 +19,13 @@ func (l *Limox) xmpp(jid string, pwd string) { domain := domainpart(jid) log.Printf("Domain: '%s'\n", domain) - tcpServer, err := net.ResolveTCPAddr("tcp", domain+":"+"5222") + roots, err := x509.SystemCertPool() if err != nil { l.XmppEvents <- err return } - log.Printf("Server: %s\n", tcpServer) - conn, err := net.DialTCP("tcp", nil, tcpServer) + conn, err := tls.Dial("tcp", domain+":"+"5223", &tls.Config{RootCAs: roots}) if err != nil { l.XmppEvents <- err return |