
commit a1a37d335a8e89ac89d85c00c8585d3fc02e064a Author: Josh Baker <joshbaker77@gmail.com> Date: Thu Oct 5 07:36:54 2017 -0700 use symlink instead of copy commit 96399c2c92620f633611c778e5473200bfd48d41 Author: Josh Baker <joshbaker77@gmail.com> Date: Thu Oct 5 07:19:26 2017 -0700 use dep for vendoring
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,
|
|
}
|
|
}
|