]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: quic/ssl: record TLS version bounds for certificate selection
authorWilliam Lallemand <wlallemand@irq6.net>
Tue, 10 Nov 2026 15:53:03 +0000 (15:53 +0000)
committerWilliam Lallemand <wlallemand@irq6.net>
Tue, 10 Nov 2026 16:01:33 +0000 (17:01 +0100)
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.

src/quic_ssl.c

index 3c2132692af83d48f046333565b4d46209dea59e..7539234c3a5a76b7f384a473748414bf8c80c937 100644 (file)
@@ -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",