From: William Lallemand Date: Tue, 10 Nov 2026 15:53:03 +0000 (+0000) Subject: BUG/MINOR: quic/ssl: record TLS version bounds for certificate selection X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=0265f7ebd6e4ccfb089dfc475460abe37c990a9e;p=haproxy.git BUG/MINOR: quic/ssl: record TLS version bounds for certificate selection QUIC restricts its SSL context to TLS 1.3 but leaves the bind's ssl_methods bounds unset. Without an explicit ssl-max-ver, the client hello callback therefore fails its TLS 1.3 check and selects RSA instead of ECDSA when both certificates match the SNI. Record the effective min/max bounds as ssl_sock_initial_ctx() does for TCP binds. This fixes issue #3566. This should be backported as far as 2.8. --- diff --git a/src/quic_ssl.c b/src/quic_ssl.c index 3c2132692..7539234c3 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -768,7 +768,12 @@ int ssl_quic_initial_ctx(struct bind_conf *bind_conf) SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS); SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION); SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION); - + /* Reflect the effective TLS version bounds for certificate selection, + * as ssl_sock_initial_ctx() does for TCP binds. + */ + bind_conf->ssl_conf.ssl_methods.min = CONF_TLSV13; + bind_conf->ssl_conf.ssl_methods.max = CONF_TLSV13; + if (SSL_CTX_set_ciphersuites(ctx, ciphersuites) != 1) { ha_warning("Binding [%s:%d] for %s %s: default QUIC cipher" " suites setting failed.\n",