]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: ssl: crt-list curves ignored with AWS-LC
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 6 Oct 2026 07:59:44 +0000 (09:59 +0200)
committerWilliam Lallemand <wlallemand@irq6.net>
Tue, 6 Oct 2026 09:35:28 +0000 (11:35 +0200)
commit17f0a3420c386fd0c001d6377fa170b9fc35f03d
treea166cea2eb3d96e125ee79e8e022a2e0a36fa3e6
parent38398d2476e1eb4852bc98303632c340667c5d63
BUG/MEDIUM: ssl: crt-list curves ignored with AWS-LC

SSL_new() copies the curves of the SSL_CTX into the SSL object, and
SSL_set_SSL_CTX() does not update this copy while the handshake uses it.
The "curves" and "ecdhe" options of a crt-list line were thus silently
ignored: a client could negotiate a curve excluded by the certificate as
long as the bind line allowed it.

The ClientHello callback used by AWS-LC now sets them again on the SSL
object after the context switch. The value is picked in the same order
as when the SSL_CTX is prepared, so the curves of the bind line still
win over the <ecdhe> of the crt-list line.

The curves setter is inefficient here: it parses the configuration
string for each connection.

This adds the ssl_crt-list_curves reg-tests for TCP and QUIC.

Tested with AWS-LC 3.6.0 (LTS) and 4.2.0. The curves regression tests
pass over TCP and QUIC with both versions.
The TLSv1.2, TLSv1.3 and QUIC cipher regression tests also pass.

Thank you to @ygkat for having reported this issue in GH #3500

This should be backported to all stable versions. Note the code is in
ssl_sock.c before 3.1.

Co-authored-by: William Lallemand <wlallemand@haproxy.com>
reg-tests/quic/ssl_crt-list_curves.vtc [new file with mode: 0644]
reg-tests/ssl/certs/curves.crt-list [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_curves.vtc [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_curves.vtci [new file with mode: 0644]
src/ssl_clienthello.c