Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/web-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ tls_server_config:
# the order of elements in cipher_suites, is used.
[ prefer_server_cipher_suites: <bool> | default = true ]

# Elliptic curves that will be used in an ECDHE handshake, in preference
# Elliptic curves and key exchange mechanisms that will be used in a TLS handshake, in preference
# order. Available curves are documented in the go documentation:
# https://golang.org/pkg/crypto/tls/#CurveID
[ curve_preferences:
Expand Down
1 change: 1 addition & 0 deletions web/testdata/web_config_noAuth_allCurves.good.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tls_server_config:
- CurveP384
- CurveP521
- X25519
- X25519MLKEM768
9 changes: 5 additions & 4 deletions web/tls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,11 @@ func (c Cipher) MarshalYAML() (any, error) {
type Curve tls.CurveID

var curves = map[string]Curve{
"CurveP256": (Curve)(tls.CurveP256),
"CurveP384": (Curve)(tls.CurveP384),
"CurveP521": (Curve)(tls.CurveP521),
"X25519": (Curve)(tls.X25519),
"CurveP256": (Curve)(tls.CurveP256),
"CurveP384": (Curve)(tls.CurveP384),
"CurveP521": (Curve)(tls.CurveP521),
"X25519": (Curve)(tls.X25519),
"X25519MLKEM768": (Curve)(tls.X25519MLKEM768),
}

func (c *Curve) UnmarshalYAML(unmarshal func(any) error) error {
Expand Down