]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic-be: Make the secret derivation works for QUIC backends (USE_QUIC_OPENSSL_...
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 28 May 2025 14:30:41 +0000 (16:30 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 11 Jun 2025 16:37:34 +0000 (18:37 +0200)
commit034cf74437a7bde8b0dafdbc38d99bd13f7adb8b
tree24bbbcb1a8d195dda249d95e1f43eeff21fd7034
parentd1cd0bb9877c92a1a48bed75707bdaf9e82df7e9
MINOR: quic-be: Make the secret derivation works for QUIC backends (USE_QUIC_OPENSSL_COMPAT)

quic_tls_compat_keylog_callback() is the callback used by the QUIC OpenSSL
compatibility module to derive the TLS secrets from other secrets provided
by keylog. The <write> local variable to this function is initialized to denote
the direction (write to send, read to receive) the secret is supposed to be used
for. That said, as the QUIC cryptographic algorithms are symmetrical, the
direction is inversed between the peer: a secret which is used to write/send/cipher
data from a peer point of view is also the secret which is used to
read/receive/decipher data. This was confirmed by the fact that without this
patch, the TLS stack first provides the peer with Handshake to send/cipher
data. The client could not use such secret to decipher the Handshake packets
received from the server. This patch simply reverse the direction stored by
<write> variable to make the secrets derivation works for the QUIC client.
src/quic_openssl_compat.c