]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: quic: remove unused tx crypto size and offset counters
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 29 Oct 2026 13:28:28 +0000 (14:28 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Tue, 3 Nov 2026 06:56:46 +0000 (07:56 +0100)
The sz and offset members of the tx crypto substructure of
quic_enc_level are written but never read: the buffered CRYPTO data are
located with the bufs array and the sz member of each quic_crypto_buf.
Let's remove them.

include/haproxy/quic_tls-t.h
src/quic_ssl.c
src/quic_tls.c

index e42655330caf12f15bcca91e2289e4630062f2b6..52f07e88fc0746a252423af4cf491c23d2686f35 100644 (file)
@@ -306,10 +306,6 @@ struct quic_enc_level {
                        struct quic_crypto_buf **bufs;
                        /* The number of element in use in the previous array. */
                        size_t nb_buf;
-                       /* The total size of the CRYPTO data stored in the CRYPTO buffers. */
-                       size_t sz;
-                       /* The offset of the CRYPT0 data stream. */
-                       uint64_t offset;
                } crypto;
        } tx;
 
index 09fff51c84be02a4457c98e79e9a427e2d58e8d0..3c2132692af83d48f046333565b4d46209dea59e 100644 (file)
@@ -96,7 +96,6 @@ static int qc_ssl_crypto_data_cpy(struct quic_conn *qc, struct quic_enc_level *q
                if (to_copy) {
                        memcpy(pos, data, to_copy);
                        /* Increment the total size of this CRYPTO buffers by <to_copy>. */
-                       qel->tx.crypto.sz += to_copy;
                        (*qcb)->sz += to_copy;
                        len -= to_copy;
                        data += to_copy;
index 0719b00b2425a8d9f5f1ec035e7c32f08533c16c..cab89916560ae50e41b1ee2a1f028d7f8109835f 100644 (file)
@@ -234,8 +234,6 @@ static int quic_conn_enc_level_init(struct quic_conn *qc,
        qel->tx.crypto.bufs[0]->sz = 0;
        qel->tx.crypto.nb_buf = 1;
 
-       qel->tx.crypto.sz = 0;
-       qel->tx.crypto.offset = 0;
        /* No CRYPTO data for early data TLS encryption level */
        if (level == ssl_encryption_early_data)
                qel->cstream = NULL;