gosec: G402 - TLS MinVersion

stablish minumim TLS version, so G402 from gosec doesn't get triggered
This commit is contained in:
Juan Abia 2021-11-29 18:10:35 +01:00 committed by Alexander Todorov
parent c8cf835db3
commit ceb72975c4
7 changed files with 9 additions and 0 deletions

View file

@ -348,6 +348,7 @@ func createTLSConfig(c *connectionConfig) (*tls.Config, error) {
Certificates: []tls.Certificate{cert},
ClientAuth: c.ClientAuth,
ClientCAs: roots,
MinVersion: tls.VersionTLS12,
VerifyPeerCertificate: func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
for _, chain := range verifiedChains {
for _, domain := range c.AllowedDomains {