|
@@ -252,25 +252,23 @@ func (info TLSInfo) ClientConfig() (*tls.Config, error) {
|
|
|
// Keep up-to-date with 'go/src/crypto/tls/common.go'
|
|
// Keep up-to-date with 'go/src/crypto/tls/common.go'
|
|
|
func ShallowCopyTLSConfig(cfg *tls.Config) *tls.Config {
|
|
func ShallowCopyTLSConfig(cfg *tls.Config) *tls.Config {
|
|
|
ncfg := tls.Config{
|
|
ncfg := tls.Config{
|
|
|
- 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,
|
|
|
|
|
- SessionTicketKey: cfg.SessionTicketKey,
|
|
|
|
|
- ClientSessionCache: cfg.ClientSessionCache,
|
|
|
|
|
- MinVersion: cfg.MinVersion,
|
|
|
|
|
- MaxVersion: cfg.MaxVersion,
|
|
|
|
|
- DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled,
|
|
|
|
|
- Renegotiation: cfg.Renegotiation,
|
|
|
|
|
- CurvePreferences: cfg.CurvePreferences,
|
|
|
|
|
|
|
+ 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,
|
|
|
|
|
+ SessionTicketKey: cfg.SessionTicketKey,
|
|
|
|
|
+ ClientSessionCache: cfg.ClientSessionCache,
|
|
|
|
|
+ MinVersion: cfg.MinVersion,
|
|
|
|
|
+ MaxVersion: cfg.MaxVersion,
|
|
|
|
|
+ CurvePreferences: cfg.CurvePreferences,
|
|
|
}
|
|
}
|
|
|
return &ncfg
|
|
return &ncfg
|
|
|
}
|
|
}
|