QUIC DEMUX: Allow BIO to be changed

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
This commit is contained in:
Hugo Landau 2022-10-31 13:54:48 +00:00
parent 97c5c52d6c
commit 964f0deb81
2 changed files with 10 additions and 0 deletions

View File

@ -193,6 +193,11 @@ QUIC_DEMUX *ossl_quic_demux_new(BIO *net_bio,
*/
void ossl_quic_demux_free(QUIC_DEMUX *demux);
/*
* Changes the BIO which the demuxer reads from.
*/
void ossl_quic_demux_set_bio(QUIC_DEMUX *demux, BIO *net_bio);
/*
* Register a datagram handler callback for a connection ID.
*

View File

@ -150,6 +150,11 @@ void ossl_quic_demux_free(QUIC_DEMUX *demux)
OPENSSL_free(demux);
}
void ossl_quic_demux_set_bio(QUIC_DEMUX *demux, BIO *net_bio)
{
demux->net_bio = net_bio;
}
static QUIC_DEMUX_CONN *demux_get_by_conn_id(QUIC_DEMUX *demux,
const QUIC_CONN_ID *dst_conn_id)
{