diff --git a/go/rtl/auth.go b/go/rtl/auth.go index 5f84e6afa..db6fb5de5 100644 --- a/go/rtl/auth.go +++ b/go/rtl/auth.go @@ -44,7 +44,7 @@ type AuthSession struct { func NewAuthSession(config ApiSettings) *AuthSession { tr := &http.Transport{ TLSClientConfig: &tls.Config{ - InsecureSkipVerify: config.VerifySsl, + InsecureSkipVerify: !config.VerifySsl, }, } return &AuthSession{ @@ -53,6 +53,7 @@ func NewAuthSession(config ApiSettings) *AuthSession { } } +// The transport parameter may override your VerifySSL setting func NewAuthSessionWithTransport(config ApiSettings, transport http.RoundTripper) *AuthSession { return &AuthSession{ Config: config,