Desktop: probe for the TPM once, off the UI thread, instead of on every unlock

This commit is contained in:
jaap-jan committed 2026-10-02 14:00:12 +02:00
1 parent 3ccafdd53b
commit 365954c541
4 files changed
+133 -5

No files matched your search

@@ -53,7 +53,7 @@ public sealed class WindowsDeviceKeyStoreTests
var store = DesktopDeviceKeyStores.ForThisMachine(new ClientPaths(Path.GetTempPath()), NoPin);
store.ShouldBeOfType<WindowsDeviceKeyStore>();
(await store.ShouldBeOfType<ProbedDeviceKeyStore>().Chosen).ShouldBeOfType<WindowsDeviceKeyStore>();
(await store.IsAvailableAsync(Token)).ShouldBeTrue();
}
@@ -77,9 +77,7 @@ public sealed class WindowsDeviceKeyStoreTests
private static void SkipUnlessSupported()
{
var supported = OperatingSystem.IsWindows()
&& DesktopDeviceKeyStores.ForThisMachine(new ClientPaths(Path.GetTempPath()), NoPin)
is WindowsDeviceKeyStore;
var supported = OperatingSystem.IsWindows() && WindowsDeviceKeyStore.IsSupported();
if (!supported)
{