]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Initialize TLS contexts for QUIC openssl wrapper
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 7 Jun 2023 09:19:51 +0000 (11:19 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 21 Jul 2023 13:54:31 +0000 (15:54 +0200)
When the QUIC OpenSSL wrapper use is enabled, all the TLS contexts (SSL_CTX) must
be configured to support it. This is done calling quic_tls_compat_init() from
ssl_sock_prepare_ctx(). Note that quic_tls_compat_init() ignore the TLS context
which are not linked to non-QUIC TLS sessions/connections.

Required for the QUIC openssl wrapper support.

src/ssl_sock.c

index 9f48483d9a0589fc180bf5c676602a3fb4d3e76b..149d5812ab4f154e22db523e3a384495cf6e9c4b 100644 (file)
@@ -4799,6 +4799,11 @@ static int ssl_sock_prepare_ctx(struct bind_conf *bind_conf, struct ssl_bind_con
        }
 #endif
 
+#ifdef USE_QUIC_OPENSSL_COMPAT
+       if (!quic_tls_compat_init(bind_conf, ctx))
+               cfgerr |= ERR_ALERT | ERR_FATAL;
+#endif
+
        return cfgerr;
 }