diff --git a/apps/desktop/electron/windows-system-ca.test.ts b/apps/desktop/electron/windows-system-ca.test.ts index 164d931c8f..fdf6af80a7 100644 --- a/apps/desktop/electron/windows-system-ca.test.ts +++ b/apps/desktop/electron/windows-system-ca.test.ts @@ -10,6 +10,7 @@ afterEach(() => vi.restoreAllMocks()) test('excludes expired roots and deduplicates real certificates with defaults first', () => { vi.spyOn(Date, 'now').mockReturnValue(new Date('2026-01-01T00:00:00Z').getTime()) + const tlsApi = fakeTlsApi( [expiredRoot, bundledRoot, bundledRoot, 'unparseable-default'], [expiredRoot, bundledRoot.replaceAll('\n', '\r\n'), privateRoot, privateRoot, 'unparseable-system'] diff --git a/apps/desktop/electron/windows-system-ca.ts b/apps/desktop/electron/windows-system-ca.ts index a2cecce08b..479c249534 100644 --- a/apps/desktop/electron/windows-system-ca.ts +++ b/apps/desktop/electron/windows-system-ca.ts @@ -45,6 +45,7 @@ function installWindowsSystemCaTrust(tlsApi: NodeTlsCaApi, platform = process.pl if (certificate.validToDate.getTime() <= now || seen.has(certificate.fingerprint256)) { return false } + seen.add(certificate.fingerprint256) } catch { // Leave PEM acceptability to Node if its X.509 parser cannot inspect it.