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.
This commit is contained in:
Frédéric Lécaille 2023-06-12 18:19:17 +02:00 committed by Amaury Denoyelle
parent 6593ec6f5e
commit dc6b339733
2 changed files with 40 additions and 26 deletions

View File

@ -537,32 +537,6 @@ struct quic_cstream {
struct qc_stream_desc *desc; 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 { struct quic_path {
/* Control congestion. */ /* Control congestion. */
struct quic_cc cc; struct quic_cc cc;

View File

@ -19,6 +19,10 @@
#include <openssl/evp.h> #include <openssl/evp.h>
#include <import/ebtree.h>
#include <haproxy/openssl-compat.h>
/* It seems TLS 1.3 ciphersuites macros differ between openssl and boringssl */ /* It seems TLS 1.3 ciphersuites macros differ between openssl and boringssl */
#if defined(OPENSSL_IS_BORINGSSL) #if defined(OPENSSL_IS_BORINGSSL)
@ -163,6 +167,42 @@ struct quic_tls_ctx {
unsigned char flags; 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 /* USE_QUIC */
#endif /* _TYPES_QUIC_TLS_H */ #endif /* _TYPES_QUIC_TLS_H */