github.com/ssdev-go/moby@v17.12.1-ce-rc2+incompatible/client/transport.go (about)

     1  package client
     2  
     3  import (
     4  	"crypto/tls"
     5  	"net/http"
     6  )
     7  
     8  // resolveTLSConfig attempts to resolve the TLS configuration from the
     9  // RoundTripper.
    10  func resolveTLSConfig(transport http.RoundTripper) *tls.Config {
    11  	switch tr := transport.(type) {
    12  	case *http.Transport:
    13  		return tr.TLSClientConfig
    14  	default:
    15  		return nil
    16  	}
    17  }