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