From 8393b44b3b3c3e0925da120337e69e2bbe24a5cf Mon Sep 17 00:00:00 2001 From: Jeremy Chang Date: Tue, 15 Feb 2022 18:28:59 +0000 Subject: [PATCH] fix: Fixed incorrect VerifySSL setting implementation --- go/rtl/auth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,