From bcfd778d578539d6db2a8435422f7d36a70ea9e1 Mon Sep 17 00:00:00 2001 From: vcptr <51714622+vcptr@users.noreply.github.com> Date: Sun, 31 May 2020 11:04:30 +0800 Subject: [PATCH] let crypto/tls choose the proper ciphers --- transport/internet/tls/config.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/transport/internet/tls/config.go b/transport/internet/tls/config.go index 8833a4f5ff..2cd25721ab 100644 --- a/transport/internet/tls/config.go +++ b/transport/internet/tls/config.go @@ -187,11 +187,8 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config { } if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 { - // use tls cipher suites from cryto/tls - config.CipherSuites = []uint16{} - for _, s := range tls.CipherSuites() { - config.CipherSuites = append(config.CipherSuites, s.ID) - } + // crypto/tls will use the proper ciphers + config.CipherSuites = nil } config.InsecureSkipVerify = c.AllowInsecure