mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 07:43:17 +00:00
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:
parent
581f1defcb
commit
ce3ca541d8
4 changed files with 33 additions and 40 deletions
|
@ -214,7 +214,10 @@ func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy.Context) error {
|
|||
// add all the cipher suites in order, without duplicates
|
||||
cipherSuitesAdded := make(map[uint16]struct{})
|
||||
for _, csName := range p.CipherSuites {
|
||||
csID := SupportedCipherSuites[csName]
|
||||
csID := CipherSuiteID(csName)
|
||||
if csID == 0 {
|
||||
return fmt.Errorf("unsupported cipher suite: %s", csName)
|
||||
}
|
||||
if _, ok := cipherSuitesAdded[csID]; !ok {
|
||||
cipherSuitesAdded[csID] = struct{}{}
|
||||
cfg.CipherSuites = append(cfg.CipherSuites, csID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue