]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC DEMUX: Allow BIO to be changed
authorHugo Landau <hlandau@openssl.org>
Mon, 31 Oct 2022 13:54:48 +0000 (13:54 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 13 Jan 2023 13:20:09 +0000 (13:20 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)

include/internal/quic_demux.h
ssl/quic/quic_demux.c

index bc5b553582039474ad641d16d1062147f6de8f26..9cbec61b9edbd6f081fdcdb96f45f8e972f4d6bf 100644 (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.
  *
index 912cec2f232fe352a7010438299a21dc8dffb18d..9ac4a1a415ec83e862ee529d4f4d098832b5745c 100644 (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)
 {