From a5c2b1cbb981789d20b341d684035acd6ecb6318 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Thu, 17 Apr 2025 10:17:40 -0400 Subject: [PATCH] Fixup creation of qlog object MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Changes for SSL_listen_ex squashed creation of qlog objects even when configured. Fix that up so qlog objects are created regardless of weather we use SSL_accept_connection or SSL_listen_ex Reviewed-by: Saša Nedvědický Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/27397) --- ssl/quic/quic_port.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ssl/quic/quic_port.c b/ssl/quic/quic_port.c index 8043fde4ff1..6f2be905721 100644 --- a/ssl/quic/quic_port.c +++ b/ssl/quic/quic_port.c @@ -542,18 +542,6 @@ static QUIC_CHANNEL *port_make_channel(QUIC_PORT *port, SSL *tls, OSSL_QRX *qrx, * We're using the normal SSL_accept_connection_path */ ch->tls = port_new_handshake_layer(port, ch); -#ifndef OPENSSL_NO_QLOG - /* - * If we're using qlog, make sure the tls get further configured properly - */ - ch->use_qlog = 1; - if (ch->tls->ctx->qlog_title != NULL) { - if ((ch->qlog_title = OPENSSL_strdup(ch->tls->ctx->qlog_title)) == NULL) { - OPENSSL_free(ch); - return NULL; - } - } -#endif } else { /* * We're deferring user ssl creation until SSL_accept_ex is called @@ -561,6 +549,18 @@ static QUIC_CHANNEL *port_make_channel(QUIC_PORT *port, SSL *tls, OSSL_QRX *qrx, ch->tls = NULL; } } +#ifndef OPENSSL_NO_QLOG + /* + * If we're using qlog, make sure the tls get further configured properly + */ + ch->use_qlog = 1; + if (ch->tls->ctx->qlog_title != NULL) { + if ((ch->qlog_title = OPENSSL_strdup(ch->tls->ctx->qlog_title)) == NULL) { + OPENSSL_free(ch); + return NULL; + } + } +#endif /* * And finally init the channel struct -- 2.47.3