Fix nil TLSClientConfig (#901)

This commit is contained in:
Kevin Maris authored and GitHub committed 2021-02-02 20:50:30 -05:00
1 parent 7cf74596bf
commit 8a8b2fb8e1
1 file changed
+4
+4
View File
@@ -170,6 +170,10 @@ func (c *Config) ConfigureTLS() error {
if c.HttpClient == nil {
c.HttpClient = cleanhttp.DefaultPooledClient()
}
if c.HttpClient.Transport.(*http.Transport).TLSClientConfig == nil {
c.HttpClient.Transport.(*http.Transport).TLSClientConfig = &tls.Config{}
}
clientTLSConfig := c.HttpClient.Transport.(*http.Transport).TLSClientConfig
var clientCert tls.Certificate