QLOG: Minor fixes after port refactor

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)
This commit is contained in:
Hugo Landau 2024-01-10 08:29:28 +00:00
parent b3706fd7e2
commit 43a128875d
4 changed files with 9 additions and 5 deletions

View File

@ -117,6 +117,9 @@ static QLOG *ch_get_qlog(QUIC_CHANNEL *ch)
if (!ch->use_qlog)
return NULL;
if (ch->is_server && ch->init_dcid.id_len == 0)
return NULL;
qti.odcid = ch->init_dcid;
qti.title = ch->qlog_title;
qti.description = NULL;

View File

@ -1508,10 +1508,6 @@ static int create_channel(QUIC_CONNECTION *qc)
QUIC_RAISE_NON_NORMAL_ERROR(NULL, ERR_R_INTERNAL_ERROR, NULL);
return 0;
}
#ifndef OPENSSL_NO_QLOG
args.use_qlog = 1; /* disabled if env not set */
args.qlog_title = qc->ssl.ctx->qlog_title;
#endif
port_args.channel_ctx = qc->ssl.ctx;
qc->port = ossl_quic_engine_create_port(qc->engine, &port_args);

View File

@ -316,6 +316,11 @@ static QUIC_CHANNEL *port_make_channel(QUIC_PORT *port, SSL *tls, int is_server)
if (args.tls == NULL)
return NULL;
#ifndef OPENSSL_NO_QLOG
args.use_qlog = 1; /* disabled if env not set */
args.qlog_title = args.tls->ctx->qlog_title;
#endif
ch = ossl_quic_channel_new(&args);
if (ch == NULL) {
if (tls == NULL)

View File

@ -885,7 +885,7 @@ IF[{- !$disabled{tests} -}]
ENDIF
IF[{- !$disabled{qlog} -}]
SOURCE[json_test]=json_test.c helpers/ssltestlib.c helpers/quictestlib.c
SOURCE[json_test]=json_test.c helpers/ssltestlib.c $QUICTESTHELPERS
INCLUDE[json_test]=../include ../apps/include
DEPEND[json_test]=../libcrypto.a ../libssl.a libtestutil.a
ENDIF