From 0047073930cc87c8950b1ba7c357ed7b001d5274 Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Thu, 5 Oct 2023 12:13:11 -0700 Subject: [PATCH] fix(lan): use the correct path for certificates The TLS helpers in the LAN plugin were not always checking the correct path for stored certificates. Fix this and add a TODO for a more permanent solution. --- src/plugins/lan/valent-lan-utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/lan/valent-lan-utils.c b/src/plugins/lan/valent-lan-utils.c index 66bf21a1a2..ff1150e3a8 100644 --- a/src/plugins/lan/valent-lan-utils.c +++ b/src/plugins/lan/valent-lan-utils.c @@ -165,9 +165,13 @@ valent_lan_handshake_peer (GTlsConnection *connection, peer_id = valent_certificate_get_common_name (peer_certificate); /* If the certificate can not be found, assume that's because the device is - * unpaired and the certificate will be verified with user interaction */ + * unpaired and the certificate will be verified with user interaction + * + * TODO: this should be handled by centralized manager object + */ file = g_file_new_build_filename (g_get_user_config_dir(), PACKAGE_NAME, - peer_id, "certificate.pem", + "device", peer_id, + "certificate.pem", NULL); if (!g_file_query_exists (file, NULL))