You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
643 B
25 lines
643 B
10 years ago
|
package httpserver
|
||
|
|
||
|
import "crypto/tls"
|
||
|
|
||
|
func getDefaultTLSConfig() *tls.Config {
|
||
10 years ago
|
config := tls.Config{}
|
||
10 years ago
|
|
||
|
//Use only modern ciphers
|
||
|
config.CipherSuites = []uint16{
|
||
|
tls.TLS_RSA_WITH_AES_128_CBC_SHA,
|
||
|
tls.TLS_RSA_WITH_AES_256_CBC_SHA,
|
||
|
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
||
|
tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
|
||
|
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
|
||
|
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
|
||
|
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
||
|
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
||
|
}
|
||
|
|
||
|
//Don't allow session resumption
|
||
|
config.SessionTicketsDisabled = true
|
||
10 years ago
|
config.ClientAuth = tls.RequireAnyClientCert
|
||
|
return &config
|
||
10 years ago
|
}
|