1
0
Fork 0

Actually use TLS config passed to method.

This commit is contained in:
Matt Goodall 2012-07-08 22:52:38 +01:00
parent f1c999d623
commit 01cff4b3ba
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ func main() {
jid, _ := xmpp.ParseJID(*jid)
password := *password
x, err := xmpp.NewClientXMPP(jid, password, &xmpp.ClientConfig{})
x, err := xmpp.NewClientXMPP(jid, password, &xmpp.ClientConfig{InsecureSkipVerify: true})
if err != nil {
log.Fatal(err)
}

View File

@ -42,7 +42,7 @@ func NewStream(addr string) (*Stream, error) {
// Upgrade the stream's underlying net conncetion to TLS.
func (stream *Stream) UpgradeTLS(config *tls.Config) error {
conn := tls.Client(stream.conn, &tls.Config{InsecureSkipVerify: true})
conn := tls.Client(stream.conn, config)
if err := conn.Handshake(); err != nil {
return err
}