]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ssl_sock: Early data disabled during SSL_CTX switching (aws-lc)
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 23 Jan 2024 13:45:25 +0000 (14:45 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Tue, 23 Jan 2024 15:03:29 +0000 (16:03 +0100)
commitfcc825501c03619305e2ab90df58f630b2a3eb95
tree6f14eb56df9d0cb3afdc1f441bff7505f7cd82eb
parentf783dd959b3e0b1670ab622d6e0cd8930f7c9ad3
MINOR: ssl_sock: Early data disabled during SSL_CTX switching (aws-lc)

This patch impacts only haproxy when built against aws-lc TLS stack (OPENSSL_IS_AWSLC).

During the SSL_CTX switching from ssl_sock_switchctx_cbk() callback,
ssl_sock_switchctx_set() is called. This latter calls SSL_set_SSL_CTX()
whose aims is to change the SSL_CTX attached o an SSL object (TLS session).
But the aws-lc (or boringssl) implementation of this function copy
the "early data enabled" setting value (boolean) coming with the SSL_CTX object
into the SSL object. So, if not set in the SSL_CTX object this setting disabled
the one which has been set by configuration into the SSL object
(see qc_set_quic_early_data_enabled(), it calls SSL_set_early_data_enabled()
with an SSL object as parameter).

Fix this enabling the "early data enabled" setting into the SSL_CTX before
setting this latter into the SSL object.

This patch is required to make QUIC 0-RTT work with haproxy built against
aws-lc.

Note that, this patch should also help in early data support for TCP connections.
src/ssl_sock.c