All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: <kernel-tls-handshake@lists.linux.dev>
Subject: [PATCH 6/8] tlshd: Strip whitespace from keyring names
Date: Sat,  5 Dec 2026 13:27:41 -0500	[thread overview]
Message-ID: <20261205182743.79220-7-cel@kernel.org> (raw)
In-Reply-To: <20261205182743.79220-1-cel@kernel.org>

GKeyFile does not strip the whitespace around a list separator, so
"keyrings=a; b" yields the name " b". The lookup of " b" fails and
tlshd does not link keyring "b". A reload after an edit that only adds
the space also unlinks a previously linked "b".

Strip each name before using it, as is already done for the
dane.resolver list.

Fixes: 58741f474fb5 ("tlshd: add 'keyrings' configuration option")
Signed-off-by: Chuck Lever <cel@kernel.org>
---
 src/tlshd/config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tlshd/config.c b/src/tlshd/config.c
index 79ec46165aa3..1cfcb8283799 100644
--- a/src/tlshd/config.c
+++ b/src/tlshd/config.c
@@ -146,6 +146,7 @@ static void tlshd_config_apply(void)
 					      "keyrings", &length, NULL);
 	if (keyrings) {
 		for (i = 0; i < length; i++) {
+			g_strstrip(keyrings[i]);
 			if (!strcmp(keyrings[i], ".nvme"))
 				continue;
 			if (!strcmp(keyrings[i], ".nfs"))
-- 
2.56.0


  parent reply	other threads:[~2026-12-05 18:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 18:27 [PATCH 0/8] More security-related fixes Chuck Lever
2026-12-05 18:27 ` [PATCH 1/8] tlshd: Unlink keyrings that a reload removes from the configuration Chuck Lever
2026-12-05 18:27 ` [PATCH 2/8] tlshd: Escape client PSK identities before logging them Chuck Lever
2026-12-05 18:27 ` [PATCH 3/8] tlshd: Escape the client certificate description before logging it Chuck Lever
2026-12-05 18:27 ` [PATCH 4/8] tlshd: Limit the number of concurrent handshake processes Chuck Lever
2026-12-05 18:27 ` [PATCH 5/8] tlshd: Enforce the QUIC handshake timeout in the event loop Chuck Lever
2026-12-05 18:27 ` Chuck Lever [this message]
2026-12-05 18:27 ` [PATCH 7/8] tlshd: Escape certificate names before logging tag filter results Chuck Lever
2026-12-05 18:27 ` [PATCH 8/8] tlshd: Skip the session ticket after a failed QUIC handshake Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261205182743.79220-7-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=kernel-tls-handshake@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.