summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-01-10 08:29:28 +0000
committerHugo Landau <hlandau@openssl.org>2024-02-02 11:49:34 +0000
commit43a128875d8fe26aec35aef093d78fbcd06fd1ca (patch)
tree956c8a83a2ec9ef388fffed8b7f2b0f1483ea977 /ssl
parentb3706fd7e23c59e0f2e737ec29a5df77e585d878 (diff)
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)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_channel.c3
-rw-r--r--ssl/quic/quic_impl.c4
-rw-r--r--ssl/quic/quic_port.c5
3 files changed, 8 insertions, 4 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index b76f825d0e..ea6a768185 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -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;
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c
index 7c0d2c65b7..6261075b76 100644
--- a/ssl/quic/quic_impl.c
+++ b/ssl/quic/quic_impl.c
@@ -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);
diff --git a/ssl/quic/quic_port.c b/ssl/quic/quic_port.c
index 0de384de45..f40d5855e3 100644
--- a/ssl/quic/quic_port.c
+++ b/ssl/quic/quic_port.c
@@ -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)