cmd/gitbayd/tls.go

bd49b87fce895e9f0a7588152548fb6e1821ac7d
gitbay/cmd/gitbayd/tls.go history · blame · raw

13 lines · 270 bytes

 1package main
 2
 3import "crypto/tls"
 4
 5// serverTLS sets the HTTPS listener's protocol floor: TLS 1.2 and 1.3,
 6// with Go's default cipher suites.
 7func serverTLS(c *tls.Config) *tls.Config {
 8	if c == nil {
 9		c = &tls.Config{}
10	}
11	c.MinVersion = tls.VersionTLS12
12	return c
13}