libnmdc: add SkipVerifyTLS option
This commit is contained in:
parent
ec0a781538
commit
da92afa51e
@ -77,6 +77,7 @@ func init() {
|
||||
|
||||
type HubConnectionOptions struct {
|
||||
Address HubAddress
|
||||
SkipVerifyTLS bool // using a negative verb, because bools default to false
|
||||
Self UserInfo
|
||||
NickPassword string
|
||||
NumEventsToBuffer uint
|
||||
@ -344,7 +345,9 @@ func (this *HubConnection) worker() {
|
||||
if this.conn == nil {
|
||||
|
||||
if this.Hco.Address.IsSecure() {
|
||||
this.conn, err = tls.Dial("tcp", this.Hco.Address.GetHostOnly(), nil)
|
||||
this.conn, err = tls.Dial("tcp", this.Hco.Address.GetHostOnly(), &tls.Config{
|
||||
InsecureSkipVerify: this.Hco.SkipVerifyTLS,
|
||||
})
|
||||
} else {
|
||||
this.conn, err = net.Dial("tcp", this.Hco.Address.GetHostOnly())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user