From: Frédéric Lécaille Date: Mon, 12 Jun 2023 16:19:17 +0000 (+0200) Subject: MINOR: quic: Move QUIC encryption level structure definition X-Git-Tag: v2.9-dev1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc6b3397336fc3ca6be14d3ef84ff3a403cff858;p=thirdparty%2Fhaproxy.git MINOR: quic: Move QUIC encryption level structure definition haproxy/quic_tls-t.h is the correct place to quic_enc_level structure definition. Should be backported as far as 2.6 to ease any further backport to come. --- diff --git a/include/haproxy/quic_conn-t.h b/include/haproxy/quic_conn-t.h index b3b5607450..a2dd9b1e9d 100644 --- a/include/haproxy/quic_conn-t.h +++ b/include/haproxy/quic_conn-t.h @@ -537,32 +537,6 @@ struct quic_cstream { struct qc_stream_desc *desc; }; -struct quic_enc_level { - enum ssl_encryption_level_t level; - struct quic_tls_ctx tls_ctx; - struct { - /* The packets received by the listener I/O handler - with header protection removed. */ - struct eb_root pkts; - /* Liste of QUIC packets with protected header. */ - struct list pqpkts; - } rx; - struct { - struct { - 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; - /* Crypto data stream */ - struct quic_cstream *cstream; - struct quic_pktns *pktns; -}; - struct quic_path { /* Control congestion. */ struct quic_cc cc; diff --git a/include/haproxy/quic_tls-t.h b/include/haproxy/quic_tls-t.h index 7ea67c43f2..55e990184b 100644 --- a/include/haproxy/quic_tls-t.h +++ b/include/haproxy/quic_tls-t.h @@ -19,6 +19,10 @@ #include +#include + +#include + /* It seems TLS 1.3 ciphersuites macros differ between openssl and boringssl */ #if defined(OPENSSL_IS_BORINGSSL) @@ -163,6 +167,42 @@ struct quic_tls_ctx { unsigned char flags; }; +struct quic_enc_level { + /* Encryption level, as defined by the TLS stack. */ + enum ssl_encryption_level_t level; + /* TLS encryption context (AEAD only) */ + struct quic_tls_ctx tls_ctx; + + /* RX part */ + struct { + /* The packets received by the listener I/O handler + * with header protection removed. + */ + struct eb_root pkts; + /* List of QUIC packets with protected header. */ + struct list pqpkts; + } rx; + + /* TX part */ + struct { + struct { + /* Array of CRYPTO data buffers */ + 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; + + /* Crypto data stream */ + struct quic_cstream *cstream; + /* Packet number space */ + struct quic_pktns *pktns; +}; + #endif /* USE_QUIC */ #endif /* _TYPES_QUIC_TLS_H */