Skip to content

Commit

Permalink
Merge pull request #2512 from vcptr/nilciphers
Browse files Browse the repository at this point in the history
let crypto/tls choose the proper ciphers
  • Loading branch information
Nicholas Wang authored May 31, 2020
2 parents 3dfee90 + bcfd778 commit 3cf16bf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions transport/internet/tls/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3cf16bf

Please sign in to comment.