pkg/transport: don't set certificates on tls config

This commit is contained in:
rob boll 2018-04-06 15:27:08 -04:00 committed by Gyuho Lee
parent 21e7a30d31
commit 7f1225a128

View File

@ -162,13 +162,12 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) {
return nil, fmt.Errorf("KeyFile and CertFile must both be present[key: %v, cert: %v]", info.KeyFile, info.CertFile) return nil, fmt.Errorf("KeyFile and CertFile must both be present[key: %v, cert: %v]", info.KeyFile, info.CertFile)
} }
tlsCert, err := tlsutil.NewCert(info.CertFile, info.KeyFile, info.parseFunc) _, err := tlsutil.NewCert(info.CertFile, info.KeyFile, info.parseFunc)
if err != nil { if err != nil {
return nil, err return nil, err
} }
cfg := &tls.Config{ cfg := &tls.Config{
Certificates: []tls.Certificate{*tlsCert},
MinVersion: tls.VersionTLS12, MinVersion: tls.VersionTLS12,
ServerName: info.ServerName, ServerName: info.ServerName,
} }