From: Hugo Landau Date: Mon, 29 Jan 2024 12:35:49 +0000 (+0000) Subject: QUIC QTX: Allow QLOG instance to be changed after instantiation X-Git-Tag: openssl-3.3.0-alpha1~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a3a9257db012adbfbc7b854f18dc00fad23c6c4;p=thirdparty%2Fopenssl.git QUIC QTX: Allow QLOG instance to be changed after instantiation Reviewed-by: Matt Caswell Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/22037) --- diff --git a/include/internal/quic_record_tx.h b/include/internal/quic_record_tx.h index 68b43f58e9b..18f7b23700a 100644 --- a/include/internal/quic_record_tx.h +++ b/include/internal/quic_record_tx.h @@ -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 * ----------------- diff --git a/ssl/quic/quic_record_tx.c b/ssl/quic/quic_record_tx.c index 972ef1ffbce..584776f834d 100644 --- a/ssl/quic/quic_record_tx.c +++ b/ssl/quic/quic_record_tx.c @@ -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,