QUIC CHANNEL: Remove legacy calls for functionality moved to QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)
This commit is contained in:
Hugo Landau 2023-11-09 10:27:13 +00:00
parent a96f48995e
commit 073e5bc781
5 changed files with 15 additions and 28 deletions

View File

@ -160,7 +160,6 @@ typedef struct quic_terminate_cause_st {
unsigned int remote : 1;
} QUIC_TERMINATE_CAUSE;
/*
* Create a new QUIC channel using the given arguments. The argument structure
* does not need to remain allocated. Returns NULL on failure.
@ -295,12 +294,6 @@ OSSL_STATM *ossl_quic_channel_get_statm(QUIC_CHANNEL *ch);
int ossl_quic_channel_get_peer_addr(QUIC_CHANNEL *ch, BIO_ADDR *peer_addr);
int ossl_quic_channel_set_peer_addr(QUIC_CHANNEL *ch, const BIO_ADDR *peer_addr);
/* Gets/sets the underlying network read and write BIOs. */
BIO *ossl_quic_channel_get_net_rbio(QUIC_CHANNEL *ch);
BIO *ossl_quic_channel_get_net_wbio(QUIC_CHANNEL *ch);
int ossl_quic_channel_set_net_rbio(QUIC_CHANNEL *ch, BIO *net_rbio);
int ossl_quic_channel_set_net_wbio(QUIC_CHANNEL *ch, BIO *net_wbio);
/*
* Returns an existing stream by stream ID. Returns NULL if the stream does not
* exist.

View File

@ -26,6 +26,15 @@
* zero or more subsidiary QUIC_CHANNEL instances, each of which represents a
* single QUIC connection. All QUIC_CHANNEL instances must belong to a
* QUIC_PORT.
*
* A QUIC port is responsible for managing a set of channels which all use the
* same UDP socket, and (in future) for automatically creating new channels when
* incoming connections are received.
*
* In order to retain compatibility with QUIC_TSERVER, it also supports a point
* of legacy compatibility where a caller can create an incoming (server role)
* channel and that channel will be automatically be bound to the next incoming
* connection. In the future this will go away once QUIC_TSERVER is removed.
*/
typedef struct quic_port_args_st {
/* All channels in a QUIC event domain share the same (libctx, propq). */

View File

@ -2531,21 +2531,6 @@ static OSSL_TIME ch_determine_next_tick_deadline(QUIC_CHANNEL *ch)
return deadline;
}
/*
* QUIC Channel: Network BIO Configuration
* =======================================
*/
int ossl_quic_channel_set_net_rbio(QUIC_CHANNEL *ch, BIO *net_rbio)
{
return ossl_quic_port_set_net_rbio(ch->port, net_rbio);
}
int ossl_quic_channel_set_net_wbio(QUIC_CHANNEL *ch, BIO *net_wbio)
{
return ossl_quic_port_set_net_wbio(ch->port, net_wbio);
}
/*
* QUIC Channel: Lifecycle Events
* ==============================

View File

@ -874,7 +874,7 @@ void ossl_quic_conn_set0_net_rbio(SSL *s, BIO *net_rbio)
if (ctx.qc->net_rbio == net_rbio)
return;
if (!ossl_quic_channel_set_net_rbio(ctx.qc->ch, net_rbio))
if (!ossl_quic_port_set_net_rbio(ctx.qc->port, net_rbio))
return;
BIO_free_all(ctx.qc->net_rbio);
@ -901,7 +901,7 @@ void ossl_quic_conn_set0_net_wbio(SSL *s, BIO *net_wbio)
if (ctx.qc->net_wbio == net_wbio)
return;
if (!ossl_quic_channel_set_net_wbio(ctx.qc->ch, net_wbio))
if (!ossl_quic_port_set_net_wbio(ctx.qc->port, net_wbio))
return;
BIO_free_all(ctx.qc->net_wbio);
@ -1478,8 +1478,8 @@ static int configure_channel(QUIC_CONNECTION *qc)
{
assert(qc->ch != NULL);
if (!ossl_quic_channel_set_net_rbio(qc->ch, qc->net_rbio)
|| !ossl_quic_channel_set_net_wbio(qc->ch, qc->net_wbio)
if (!ossl_quic_port_set_net_rbio(qc->port, qc->net_rbio)
|| !ossl_quic_port_set_net_wbio(qc->port, qc->net_wbio)
|| !ossl_quic_channel_set_peer_addr(qc->ch, &qc->init_peer_addr))
return 0;

View File

@ -130,8 +130,8 @@ QUIC_TSERVER *ossl_quic_tserver_new(const QUIC_TSERVER_ARGS *args,
if ((srv->ch = ossl_quic_port_create_incoming(srv->port, srv->tls)) == NULL)
goto err;
if (!ossl_quic_channel_set_net_rbio(srv->ch, srv->args.net_rbio)
|| !ossl_quic_channel_set_net_wbio(srv->ch, srv->args.net_wbio))
if (!ossl_quic_port_set_net_rbio(srv->port, srv->args.net_rbio)
|| !ossl_quic_port_set_net_wbio(srv->port, srv->args.net_wbio))
goto err;
qc = OPENSSL_zalloc(sizeof(*qc));