go16.go 914 B

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