Merge pull request #2512 from vcptr/nilciphers

let crypto/tls choose the proper ciphers
pull/2513/head
Nicholas Wang 2020-05-30 22:10:27 -05:00 committed by GitHub
commit 3cf16bf7df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -187,11 +187,8 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
} }
if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 { if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 {
// use tls cipher suites from cryto/tls // crypto/tls will use the proper ciphers
config.CipherSuites = []uint16{} config.CipherSuites = nil
for _, s := range tls.CipherSuites() {
config.CipherSuites = append(config.CipherSuites, s.ID)
}
} }
config.InsecureSkipVerify = c.AllowInsecure config.InsecureSkipVerify = c.AllowInsecure