From: Hugo Landau Date: Thu, 9 Nov 2023 10:27:13 +0000 (+0000) Subject: QUIC CHANNEL: Keep a reference to a QUIC_PORT X-Git-Tag: openssl-3.3.0-alpha1~444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12ab8afcebf7eba3c79cfc8bdaf24c998b379e2a;p=thirdparty%2Fopenssl.git QUIC CHANNEL: Keep a reference to a QUIC_PORT Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/22674) --- diff --git a/include/internal/quic_channel.h b/include/internal/quic_channel.h index 6f883faf76d..d4f3018cc47 100644 --- a/include/internal/quic_channel.h +++ b/include/internal/quic_channel.h @@ -106,6 +106,8 @@ # define QUIC_CHANNEL_STATE_TERMINATED 4 typedef struct quic_channel_args_st { + QUIC_PORT *port; + OSSL_LIB_CTX *libctx; const char *propq; int is_server; @@ -326,6 +328,7 @@ int ossl_quic_channel_is_active(const QUIC_CHANNEL *ch); int ossl_quic_channel_is_handshake_complete(const QUIC_CHANNEL *ch); int ossl_quic_channel_is_handshake_confirmed(const QUIC_CHANNEL *ch); +QUIC_PORT *ossl_quic_channel_get0_port(QUIC_CHANNEL *ch); QUIC_DEMUX *ossl_quic_channel_get0_demux(QUIC_CHANNEL *ch); SSL *ossl_quic_channel_get0_ssl(QUIC_CHANNEL *ch); diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c index d3b7947fb46..22a1b158d2f 100644 --- a/ssl/quic/quic_channel.c +++ b/ssl/quic/quic_channel.c @@ -548,6 +548,7 @@ QUIC_CHANNEL *ossl_quic_channel_new(const QUIC_CHANNEL_ARGS *args) if ((ch = OPENSSL_zalloc(sizeof(*ch))) == NULL) return NULL; + ch->port = args->port; ch->libctx = args->libctx; ch->propq = args->propq; ch->is_server = args->is_server; @@ -685,6 +686,11 @@ QUIC_DEMUX *ossl_quic_channel_get0_demux(QUIC_CHANNEL *ch) return ch->demux; } +QUIC_PORT *ossl_quic_channel_get0_port(QUIC_CHANNEL *ch) +{ + return ch->port; +} + CRYPTO_MUTEX *ossl_quic_channel_get_mutex(QUIC_CHANNEL *ch) { return ch->mutex; diff --git a/ssl/quic/quic_channel_local.h b/ssl/quic/quic_channel_local.h index f4a02559c64..67e648b42f8 100644 --- a/ssl/quic/quic_channel_local.h +++ b/ssl/quic/quic_channel_local.h @@ -36,6 +36,8 @@ DEFINE_LIST_OF(stateless_reset_tokens, QUIC_SRT_ELEM); * Other components should not include this header. */ struct quic_channel_st { + QUIC_PORT *port; + OSSL_LIB_CTX *libctx; const char *propq;