forked from chteufleur/go-xmpp
Actually use TLS config passed to method.
This commit is contained in:
parent
f1c999d623
commit
01cff4b3ba
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue