Change default TLS options for more security
This commit is contained in:
parent
703de5331b
commit
c84378d649
5 changed files with 59 additions and 75 deletions
|
@ -27,6 +27,17 @@ const (
|
|||
var DefaultTLSOptions = Options{
|
||||
// ensure http2 enabled
|
||||
ALPNProtocols: []string{"h2", "http/1.1", tlsalpn01.ACMETLS1Protocol},
|
||||
MinVersion: "VersionTLS12",
|
||||
CipherSuites: getCipherSuites(),
|
||||
}
|
||||
|
||||
func getCipherSuites() []string {
|
||||
gsc := tls.CipherSuites()
|
||||
ciphers := make([]string, len(gsc))
|
||||
for idx, cs := range gsc {
|
||||
ciphers[idx] = cs.Name
|
||||
}
|
||||
return ciphers
|
||||
}
|
||||
|
||||
// Manager is the TLS option/store/configuration factory.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue