diff --git a/src/libnmdc/libnmdc.go b/src/libnmdc/libnmdc.go index 056adb5..029c4d2 100644 --- a/src/libnmdc/libnmdc.go +++ b/src/libnmdc/libnmdc.go @@ -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()) }