Skip to content

Commit

Permalink
Fix G402: TLS MinVersion too low
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Carpio <[email protected]>
  • Loading branch information
ibice authored and Issif committed Sep 3, 2023
1 parent 5130027 commit a576ddf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions outputs/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ func (c *Client) sendRequest(method string, payload interface{}) error {
customTransport := http.DefaultTransport.(*http.Transport).Clone()

if customTransport.TLSClientConfig == nil {
customTransport.TLSClientConfig = &tls.Config{}
customTransport.TLSClientConfig = &tls.Config{
MinVersion: tls.VersionTLS12,
}
}

customTransport.TLSClientConfig.MinVersion = tls.VersionTLS12

if customTransport.TLSClientConfig.RootCAs == nil {
pool, err := x509.SystemCertPool()
if err != nil {
Expand Down

0 comments on commit a576ddf

Please sign in to comment.