QUIC QTX: Allow QLOG instance to be changed after instantiation
authorHugo Landau <hlandau@openssl.org>
Mon, 29 Jan 2024 12:35:49 +0000 (12:35 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 2 Feb 2024 11:50:29 +0000 (11:50 +0000)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)

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

index 68b43f58e9bc4d0bb9f7cae49cb10775c747bf67..18f7b23700a6d455163183784930f96386021b30 100644 (file)
@@ -68,6 +68,9 @@ void ossl_qtx_set_msg_callback(OSSL_QTX *qtx, ossl_msg_cb msg_callback,
                                SSL *msg_callback_ssl);
 void ossl_qtx_set_msg_callback_arg(OSSL_QTX *qtx, void *msg_callback_arg);
 
+/* Change QLOG instance in use after instantiation. */
+void ossl_qtx_set_qlog(OSSL_QTX *qtx, QLOG *qlog);
+
 /*
  * Secret Management
  * -----------------
index 972ef1ffbceb55d5ead88ade0fb5b6e0ae0b786a..584776f834d8baf100d7d792716b1a7baba9d932 100644 (file)
@@ -167,6 +167,11 @@ void ossl_qtx_set_mutator(OSSL_QTX *qtx, ossl_mutate_packet_cb mutatecb,
     qtx->mutatearg      = mutatearg;
 }
 
+void ossl_qtx_set_qlog(OSSL_QTX *qtx, QLOG *qlog)
+{
+    qtx->qlog = qlog;
+}
+
 int ossl_qtx_provide_secret(OSSL_QTX              *qtx,
                             uint32_t               enc_level,
                             uint32_t               suite_id,