Browse Source

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

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

+ 3 - 4
pkg/transport/listener.go

@@ -202,15 +202,14 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) {
 		info.Logger = zap.NewNop()
 	}
 
-	tlsCert, err := tlsutil.NewCert(info.CertFile, info.KeyFile, info.parseFunc)
+	_, err := tlsutil.NewCert(info.CertFile, info.KeyFile, info.parseFunc)
 	if err != nil {
 		return nil, err
 	}
 
 	cfg := &tls.Config{
-		Certificates: []tls.Certificate{*tlsCert},
-		MinVersion:   tls.VersionTLS12,
-		ServerName:   info.ServerName,
+		MinVersion: tls.VersionTLS12,
+		ServerName: info.ServerName,
 	}
 
 	if info.AllowedCN != "" {