1 // +build go1.7,!go1.8 2 3 package redis 4 5 import "crypto/tls" 6 7 func cloneTLSConfig(cfg *tls.Config) *tls.Config { 8 return &tls.Config{ 9 Rand: cfg.Rand, 10 Time: cfg.Time, 11 Certificates: cfg.Certificates, 12 NameToCertificate: cfg.NameToCertificate, 13 GetCertificate: cfg.GetCertificate, 14 RootCAs: cfg.RootCAs, 15 NextProtos: cfg.NextProtos, 16 ServerName: cfg.ServerName, 17 ClientAuth: cfg.ClientAuth, 18 ClientCAs: cfg.ClientCAs, 19 InsecureSkipVerify: cfg.InsecureSkipVerify, 20 CipherSuites: cfg.CipherSuites, 21 PreferServerCipherSuites: cfg.PreferServerCipherSuites, 22 ClientSessionCache: cfg.ClientSessionCache, 23 MinVersion: cfg.MinVersion, 24 MaxVersion: cfg.MaxVersion, 25 CurvePreferences: cfg.CurvePreferences, 26 DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled, 27 Renegotiation: cfg.Renegotiation, 28 } 29 } 30