From 33cd96a5e9fb4f2e17401c69fd3ecfc1f46b02e2 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 12 Jun 2025 15:15:56 +0200 Subject: [PATCH] BUG/MINOR: quic: prevent crash on startup with -dt QUIC traces in ssl_quic_srv_new_ssl_ctx() are problematic as this function is called early during startup. If activating traces via -dt command-line argument, a crash occurs due to stderr sink not yet available. Thus, traces from ssl_quic_srv_new_ssl_ctx() are simply removed. No backport needed. --- src/quic_ssl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/quic_ssl.c b/src/quic_ssl.c index 21c4237aa..327a24402 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -780,13 +780,9 @@ SSL_CTX *ssl_quic_srv_new_ssl_ctx(void) SSL_OP_SINGLE_ECDH_USE | SSL_OP_CIPHER_SERVER_PREFERENCE; - TRACE_ENTER(QUIC_EV_CONN_NEW); - ctx = SSL_CTX_new(TLS_client_method()); - if (!ctx) { - TRACE_ERROR("Could not allocate a new TLS context", QUIC_EV_CONN_NEW); + if (!ctx) goto err; - } SSL_CTX_set_options(ctx, options); SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION); @@ -797,12 +793,10 @@ SSL_CTX *ssl_quic_srv_new_ssl_ctx(void) #endif leave: - TRACE_LEAVE(QUIC_EV_CONN_NEW); return ctx; err: SSL_CTX_free(ctx); ctx = NULL; - TRACE_DEVEL("leaving on error", QUIC_EV_CONN_NEW); goto leave; }