Browse Source

add tls1.3 ciphers

pull/2531/head
Kslr 6 years ago committed by Nicholas Wang
parent
commit
aa4dc77978
No known key found for this signature in database
GPG Key ID: F20CA399C9BD9100
  1. 20
      transport/internet/tls/config.go

20
transport/internet/tls/config.go

@ -187,8 +187,24 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
}
if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 {
// crypto/tls will use the proper ciphers
config.CipherSuites = nil
config.CipherSuites = []uint16{
tls.TLS_AES_128_GCM_SHA256,
tls.TLS_AES_256_GCM_SHA384,
tls.TLS_CHACHA20_POLY1305_SHA256,
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,
}
}
config.InsecureSkipVerify = c.AllowInsecure

Loading…
Cancel
Save