mirror of
https://github.com/minio/minio.git
synced 2024-12-26 23:25:54 -05:00
3edff1501e
We forked the upstream to address a build issue on go 1.6 - that is long done and we don't need to manage our forks anymore.
34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
// +build go1.7
|
|
|
|
package redis
|
|
|
|
import "crypto/tls"
|
|
|
|
// similar cloneTLSClientConfig in the stdlib, but also honor skipVerify for the nil case
|
|
func cloneTLSClientConfig(cfg *tls.Config, skipVerify bool) *tls.Config {
|
|
if cfg == nil {
|
|
return &tls.Config{InsecureSkipVerify: skipVerify}
|
|
}
|
|
return &tls.Config{
|
|
Rand: cfg.Rand,
|
|
Time: cfg.Time,
|
|
Certificates: cfg.Certificates,
|
|
NameToCertificate: cfg.NameToCertificate,
|
|
GetCertificate: cfg.GetCertificate,
|
|
RootCAs: cfg.RootCAs,
|
|
NextProtos: cfg.NextProtos,
|
|
ServerName: cfg.ServerName,
|
|
ClientAuth: cfg.ClientAuth,
|
|
ClientCAs: cfg.ClientCAs,
|
|
InsecureSkipVerify: cfg.InsecureSkipVerify,
|
|
CipherSuites: cfg.CipherSuites,
|
|
PreferServerCipherSuites: cfg.PreferServerCipherSuites,
|
|
ClientSessionCache: cfg.ClientSessionCache,
|
|
MinVersion: cfg.MinVersion,
|
|
MaxVersion: cfg.MaxVersion,
|
|
CurvePreferences: cfg.CurvePreferences,
|
|
DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled,
|
|
Renegotiation: cfg.Renegotiation,
|
|
}
|
|
}
|