mirror of
https://github.com/astaxie/beego.git
synced 2024-11-05 16:40:55 +00:00
30 lines
1.1 KiB
Go
30 lines
1.1 KiB
Go
// +build go1.7,!go1.8
|
|
|
|
package redis
|
|
|
|
import "crypto/tls"
|
|
|
|
func cloneTLSConfig(cfg *tls.Config) *tls.Config {
|
|
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,
|
|
}
|
|
}
|