move httpserver under server

This commit is contained in:
Anand Babu (AB) Periasamy
2015-02-23 11:03:01 -08:00
parent 7c608ec857
commit de41e465c8
3 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
package httpserver
import "crypto/tls"
func getDefaultTLSConfig() *tls.Config {
config := tls.Config{}
//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
config.ClientAuth = tls.RequireAnyClientCert
return &config
}