mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-26 19:47:42 +00:00
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 <[email protected]> Claude-Session: https://claude.ai/code/session_014cgmCWUB2zNH4uiMEioafC
This commit is contained in:
1 parent
d3ecc7bea5
commit
468009b784
1 file changed
+15
@@ -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 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
- <key>EnablePressuredExit</key>
|
||||
+ <key>KeepAlive</key>
|
||||
+ <true/>
|
||||
+ <key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>EnableTransactions</key>
|
||||
<true/>
|
||||
diff --git a/trust/trustd/trustdFileHelper/main.m b/trust/trustd/trustdFileHelper/main.m
|
||||
index f6d166e2..fb7ae819 100644
|
||||
--- a/trust/trustd/trustdFileHelper/main.m
|
||||
|
||||
Reference in new issue
Block a user