From: Hugo Landau Date: Mon, 31 Oct 2022 13:54:48 +0000 (+0000) Subject: QUIC DEMUX: Allow BIO to be changed X-Git-Tag: openssl-3.2.0-alpha1~1528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=964f0deb81f3025c11e451dc37f8e2f1c85548ed;p=thirdparty%2Fopenssl.git QUIC DEMUX: Allow BIO to be changed Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/19703) --- diff --git a/include/internal/quic_demux.h b/include/internal/quic_demux.h index bc5b5535820..9cbec61b9ed 100644 --- a/include/internal/quic_demux.h +++ b/include/internal/quic_demux.h @@ -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. * diff --git a/ssl/quic/quic_demux.c b/ssl/quic/quic_demux.c index 912cec2f232..9ac4a1a415e 100644 --- a/ssl/quic/quic_demux.c +++ b/ssl/quic/quic_demux.c @@ -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) {