changes done as per review comments

This commit is contained in:
Rahul Somasundaram 2022-10-05 00:12:53 +05:30
parent 24eb3476db
commit 15b19ff726
No known key found for this signature in database
GPG key ID: 466FF35FC278207A
5 changed files with 41 additions and 22 deletions
internal/home

View file

@ -383,7 +383,7 @@ func initWeb(args options, clientBuildFS fs.FS) (web *Web, err error) {
clientBetaFS: clientBetaFS,
serveHTTP3: config.DNS.ServeHTTP3,
tlsCiphers: config.TLS.TLSCiphers,
tlsCiphers: getTLSCiphers(),
}
web = newWeb(&webConf)
@ -888,3 +888,16 @@ type jsonError struct {
// Message is the error message, an opaque string.
Message string `json:"message"`
}
// getTLSCiphers check for overriden tls ciphers, if the slice is
// empty, then default safe ciphers are used
func getTLSCiphers() []uint16 {
var cipher []uint16
if len(config.TLS.OverrideTLSCiphers) == 0 {
cipher = aghtls.SaferCipherSuites()
} else {
cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers)
}
return cipher
}