Browse Source

Merge pull request #2510 from vcptr/dfsuites

tls use crypto std cipher suites
pull/2512/head
Nicholas Wang 5 years ago committed by GitHub
parent
commit
3dfee909a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      transport/internet/tls/config.go

21
transport/internet/tls/config.go

@ -187,23 +187,10 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
} }
if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 { if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 {
config.CipherSuites = []uint16{ // use tls cipher suites from cryto/tls
tls.TLS_AES_128_GCM_SHA256, config.CipherSuites = []uint16{}
tls.TLS_AES_256_GCM_SHA384, for _, s := range tls.CipherSuites() {
tls.TLS_CHACHA20_POLY1305_SHA256, config.CipherSuites = append(config.CipherSuites, s.ID)
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
} }
} }

Loading…
Cancel
Save