a41f938cec
As we have seen, dependencies version can prevent the build. We should user lock versions on dependencies that we know work: * Packages are vendored * Add Godep support * Added addtional install step in readme * Fix travis build error
19 lignes
422 o
Go
19 lignes
422 o
Go
package httptoo
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"net/http"
|
|
)
|
|
|
|
// Returns the http.Client's TLS Config, traversing and generating any
|
|
// defaults along the way to get it.
|
|
func ClientTLSConfig(cl *http.Client) *tls.Config {
|
|
if cl.Transport == nil {
|
|
cl.Transport = http.DefaultTransport
|
|
}
|
|
tr := cl.Transport.(*http.Transport)
|
|
if tr.TLSClientConfig == nil {
|
|
tr.TLSClientConfig = &tls.Config{}
|
|
}
|
|
return tr.TLSClientConfig
|
|
}
|