Browse Source

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

rob boll 7 years ago
parent
commit
08dc184618
1 changed files with 3 additions and 4 deletions
  1. 3 4
      pkg/transport/listener.go

+ 3 - 4
pkg/transport/listener.go

@@ -168,15 +168,14 @@ 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,
-		ServerName:   info.ServerName,
+		MinVersion: tls.VersionTLS12,
+		ServerName: info.ServerName,
 	}
 	}
 
 
 	if info.AllowedCN != "" {
 	if info.AllowedCN != "" {