caddytls: Update cipher suite names and curve names

Now using IANA-compliant names and Go 1.14's CipherSuites() function so
we don't have to maintain our own mapping of currently-secure cipher
suites.
This commit is contained in:
Matthew Holt
2020-04-01 14:09:29 -06:00
parent 581f1defcb
commit ce3ca541d8
4 changed files with 33 additions and 40 deletions

View File

@ -274,9 +274,9 @@ func (t Transport) buildEnv(r *http.Request) (map[string]string, error) {
env["SSL_PROTOCOL"] = v
}
// and pass the cipher suite in a manner compatible with apache's mod_ssl
for k, v := range caddytls.SupportedCipherSuites {
if v == r.TLS.CipherSuite {
env["SSL_CIPHER"] = k
for _, cs := range caddytls.SupportedCipherSuites() {
if cs.ID == r.TLS.CipherSuite {
env["SSL_CIPHER"] = cs.Name
break
}
}