2016-09-08 00:38:55 -04:00
|
|
|
// +build go1.7,!go1.8
|
2016-09-06 14:46:37 -04:00
|
|
|
|
2018-02-05 16:05:59 -05:00
|
|
|
package client // import "github.com/docker/docker/client"
|
2016-09-06 14:46:37 -04:00
|
|
|
|
|
|
|
import "crypto/tls"
|
|
|
|
|
2017-09-06 12:13:01 -04:00
|
|
|
// tlsConfigClone returns a clone of tls.Config. This function is provided for
|
2016-09-06 14:46:37 -04:00
|
|
|
// compatibility for go1.7 that doesn't include this method in stdlib.
|
2017-09-06 12:13:01 -04:00
|
|
|
func tlsConfigClone(c *tls.Config) *tls.Config {
|
2016-09-06 14:46:37 -04:00
|
|
|
return &tls.Config{
|
|
|
|
Rand: c.Rand,
|
|
|
|
Time: c.Time,
|
|
|
|
Certificates: c.Certificates,
|
|
|
|
NameToCertificate: c.NameToCertificate,
|
|
|
|
GetCertificate: c.GetCertificate,
|
|
|
|
RootCAs: c.RootCAs,
|
|
|
|
NextProtos: c.NextProtos,
|
|
|
|
ServerName: c.ServerName,
|
|
|
|
ClientAuth: c.ClientAuth,
|
|
|
|
ClientCAs: c.ClientCAs,
|
|
|
|
InsecureSkipVerify: c.InsecureSkipVerify,
|
|
|
|
CipherSuites: c.CipherSuites,
|
|
|
|
PreferServerCipherSuites: c.PreferServerCipherSuites,
|
|
|
|
SessionTicketsDisabled: c.SessionTicketsDisabled,
|
|
|
|
SessionTicketKey: c.SessionTicketKey,
|
|
|
|
ClientSessionCache: c.ClientSessionCache,
|
|
|
|
MinVersion: c.MinVersion,
|
|
|
|
MaxVersion: c.MaxVersion,
|
|
|
|
CurvePreferences: c.CurvePreferences,
|
|
|
|
DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled,
|
|
|
|
Renegotiation: c.Renegotiation,
|
|
|
|
}
|
|
|
|
}
|