forked from jshiffer/go-xmpp
Add support for self-signed certificates
This commit is contained in:
committed by
Mickaël Rémond
parent
79803a8af9
commit
9577036327
+3
-2
@@ -86,8 +86,9 @@ func (c *ServerCheck) Check() error {
|
||||
return fmt.Errorf("expecting starttls proceed: %s", err)
|
||||
}
|
||||
|
||||
stanza.DefaultTlsConfig.ServerName = c.domain
|
||||
tlsConn := tls.Client(tcpconn, &stanza.DefaultTlsConfig)
|
||||
var tlsConfig tls.Config
|
||||
tlsConfig.ServerName = c.domain
|
||||
tlsConn := tls.Client(tcpconn, &tlsConfig)
|
||||
// We convert existing connection to TLS
|
||||
if err = tlsConn.Handshake(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user