]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: Add reusable cipher contexts for header protection
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 19 Aug 2022 16:18:13 +0000 (18:18 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 19 Aug 2022 16:31:59 +0000 (18:31 +0200)
commit86a53c566935c8f331a694b50a49f918364d0aa2
tree20b8b565cbe54c042fd1a8b361f7252b251c9b2f
parenta8942cd9c48680d7c6839ba8d04b158f5489dbaa
MINOR: quic: Add reusable cipher contexts for header protection

Implement quic_tls_rx_hp_ctx_init() and quic_tls_tx_hp_ctx_init() to initiliaze
such header protection cipher contexts for each RX and TX parts and for each
packet number spaces, only one time by connection.
Make qc_new_isecs() call these two functions to initialize the cipher contexts
of the Initial secrets. Same thing for ha_quic_set_encryption_secrets() to
initialize the cipher contexts of the subsequent derived secrets (ORTT, 1RTT,
Handshake).
Modify qc_do_rm_hp() and quic_apply_header_protection() to reuse these
cipher contexts.
Note that there is no need to modify the key update for the header protection.
The header protection secrets are never updated.
include/haproxy/quic_tls-t.h
include/haproxy/quic_tls.h
src/quic_tls.c
src/xprt_quic.c