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

AWS-LC's SSL_new() copies the cipher lists of the SSL_CTX into the SSL
object, and SSL_set_SSL_CTX() does not update this copy while the server
handshake uses it. The "ciphers" and "ciphersuites" options of a
crt-list line were thus silently ignored: a client could negotiate a cipher
excluded by the certificate as long as the bind line allowed it. The same
configuration built against OpenSSL rejects such a connection.

The SNI callback now sets both lists again on the SSL object after the
context switch when built with AWS-LC API versions greater than 30.
API version 30 (AWS-LC 3.x) uses the selected SSL_CTX cipher lists
directly and does not need this workaround.

These setters are inefficient here: they parse the cipher configuration
strings for each connection.

This adds the ssl_crt-list_ciphers reg-test for TLSv1.2 and the
ssl_crt-list_ciphersuites ones for TLSv1.3, over TCP and QUIC.

Tested with AWS-LC LTS versions 3.6.0 and 4.2.0.

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

This should be backported as far as 3.0. 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_ciphersuites.vtc [new file with mode: 0644]
reg-tests/ssl/certs/ciphers.crt-list [new file with mode: 0644]
reg-tests/ssl/certs/ciphersuites.crt-list [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_ciphers.vtc [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_ciphersuites.vtc [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_ciphersuites.vtci [new file with mode: 0644]
src/ssl_clienthello.c