Skip to content

Commit f9e0802

Browse files
committed
improvement(Windows,MacOS): Use system certificates store #1227
1 parent 7b09e16 commit f9e0802

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

desktopApp/build.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,26 @@ compose.desktop {
101101
jvmArgs(
102102
"-Dapple.awt.application.appearance=system",
103103
)
104+
105+
// Support system Keychain as thrust store:
106+
// https://github.com/AChep/keyguard-app/issues/1227
107+
val platformJvmArgs = when {
108+
Os.isFamily(Os.FAMILY_MAC) -> {
109+
arrayOf(
110+
"-Djavax.net.ssl.trustStore=/dev/null",
111+
"-Djavax.net.ssl.trustStoreType=KeychainStore",
112+
)
113+
}
114+
Os.isFamily(Os.FAMILY_WINDOWS) -> {
115+
arrayOf(
116+
"-Djavax.net.ssl.trustStore=NONE",
117+
"-Djavax.net.ssl.trustStoreType=Windows-ROOT",
118+
)
119+
}
120+
else -> arrayOf()
121+
}
122+
jvmArgs(*platformJvmArgs)
123+
104124
includeAllModules = true
105125
val formats = listOfNotNull(
106126
TargetFormat.Dmg,

0 commit comments

Comments
 (0)