From 468009b7847aac6cf38aa251cbf9c49b73fded22 Mon Sep 17 00:00:00 2001 From: Benjamin <18471851+WolfBlack879@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:10:06 -0300 Subject: [PATCH] security: keep trustd running from boot The Riot Client UI intermittently stayed black for 30s to 2+ minutes (sometimes indefinitely). Electron 22 / Chrome 108 verifies the local Riot backend's TLS certificate through SecTrust, which calls trustd over XPC. trustd is launched on demand and has EnablePressuredExit, so it is often not running; under Darling the on-demand launch can take minutes, and every cert verification (serialized behind Chrome's global lock) waits for it. The UI's websocket handshake stalls after ServerHello until then. Start trustd at boot and keep it alive. Measured on one machine: before, time to "renderer socket connected to Foundation" ranged 0.8s-136s or never; after, 0.83s / 0.85s / 0.97s on three launches. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014cgmCWUB2zNH4uiMEioafC --- patches/security.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/patches/security.patch b/patches/security.patch index d12af04..c975769 100644 --- a/patches/security.patch +++ b/patches/security.patch @@ -205,6 +205,21 @@ index 06c5d4aa..9f24ea91 100644 if (context.numTasks >= MAX_TASKS) { secnotice("http", "Too many fetch %@ requests for this cert", [self class]); return true; +diff --git a/trust/trustd/macOS/com.apple.trustd.plist b/trust/trustd/macOS/com.apple.trustd.plist +index b3780e3c..71e089a4 100644 +--- a/trust/trustd/macOS/com.apple.trustd.plist ++++ b/trust/trustd/macOS/com.apple.trustd.plist +@@ -2,7 +2,9 @@ + + + +- EnablePressuredExit ++ KeepAlive ++ ++ RunAtLoad + + EnableTransactions + diff --git a/trust/trustd/trustdFileHelper/main.m b/trust/trustd/trustdFileHelper/main.m index f6d166e2..fb7ae819 100644 --- a/trust/trustd/trustdFileHelper/main.m