]> git.kaiwu.me - haproxy.git/commit
MINOR: quic_tls: Add reusable cipher contexts to QUIC TLS contexts
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 5 Apr 2022 08:28:29 +0000 (10:28 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 8 Apr 2022 13:38:29 +0000 (15:38 +0200)
commitf4605748f44dac766e910138813b76a0be9f3635
tree9496ac85533fb408b4d0373d44a6e4c0c41c7ee2
parent82851bd3cbf8ad647971988e0303b2e0b0284511
MINOR: quic_tls: Add reusable cipher contexts to QUIC TLS contexts

Add ->ctx new member field to quic_tls_secrets struct to store the cipher context
for each QUIC TLS context TX/RX parts.
Add quic_tls_rx_ctx_init() and quic_tls_tx_ctx_init() functions to initialize
these cipher context for RX and TX parts respectively.
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, Handshake,
1RTT).
Modify quic_tls_decrypt() and quic_tls_encrypt() to always use the same cipher
context without allocating it each time they are called.
include/haproxy/quic_tls-t.h
include/haproxy/quic_tls.h
src/quic_tls.c
src/xprt_quic.c