Remove redundent assignment to InsecureSkipVerify

This second codepath is redundent, since tlsConfig.InsecureSkipVerify is
assigned to earlier in that function body. In addition, there's no need
to wrap the assignment in a check on that boolean value in this case.

Signed-off-by: Paul Tagliamonte <paultag@gmail.com>
This commit is contained in:
Paul Tagliamonte 2015-08-30 19:42:33 -04:00
parent b8f7c3446b
commit e75902ffbf
1 changed files with 0 additions and 3 deletions

View File

@ -27,9 +27,6 @@ func getTLSConfig(caCert, cert, key []byte, allowInsecure bool) (*tls.Config, er
return &tlsConfig, err
}
tlsConfig.Certificates = []tls.Certificate{keypair}
if allowInsecure {
tlsConfig.InsecureSkipVerify = true
}
return &tlsConfig, nil
}