Enforce a minium TLS version of 1.2
Fixes linter issue G402: TLS MinVersion too low.
@@ -121,6 +121,7 @@ func chartURL(location *fleet.HelmOptions, auth Auth) (string, error) {
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.TLSClientConfig = &tls.Config{
RootCAs: pool,
+ MinVersion: tls.VersionTLS12,
}
client.Transport = transport
}
@@ -334,6 +335,7 @@ func readContent(ctx context.Context, progress *progress.Progress, base, name st
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.TLSClientConfig = &tls.Config{
RootCAs: pool,
+ MinVersion: tls.VersionTLS12,
}
httpGetter.Client.Transport = transport
}
