diff --git a/desktopApp/build.gradle.kts b/desktopApp/build.gradle.kts index 6c26dd5b..903777bc 100644 --- a/desktopApp/build.gradle.kts +++ b/desktopApp/build.gradle.kts @@ -21,7 +21,8 @@ kotlin { implementation(compose.materialIconsExtended) implementation(compose.desktop.currentOs) implementation(compose.components.resources) - implementation(libs.conscrypt.openjdk) + implementation(libs.bouncycastle.bcprov) + implementation(libs.bouncycastle.bctls) implementation(project(":common")) } } diff --git a/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt b/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt index 8be1dd74..ab9d32ba 100644 --- a/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt +++ b/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt @@ -70,7 +70,8 @@ import kotlinx.coroutines.flow.mapLatest import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import kotlinx.datetime.Clock -import org.conscrypt.Conscrypt +import org.bouncycastle.jce.provider.BouncyCastleProvider +import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.resources.stringResource import org.kodein.di.DI @@ -85,11 +86,12 @@ import java.util.Locale import kotlin.reflect.KClass fun main() { - // Add Conscrypt as the first security provider + // Add BouncyCastle as the first security provider // to make OkHTTP use its TLS instead of a platform // specific one. // https://github.com/square/okhttp?tab=readme-ov-file#requirements - Security.insertProviderAt(Conscrypt.newProvider(), 1) + Security.insertProviderAt(BouncyCastleProvider(), 1) + Security.insertProviderAt(BouncyCastleJsseProvider(), 2) val kamelConfig = KamelConfig { this.takeFrom(KamelConfig.Default) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e8974b56..f393a18c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -231,6 +231,7 @@ landscapist-glide = { module = "com.github.skydoves:landscapist-glide", version. landscapist-placeholder = { module = "com.github.skydoves:landscapist-placeholder", version.ref = "landscapist" } bouncycastle-bcpkix = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bouncycastle" } bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bouncycastle" } +bouncycastle-bctls = { module = "org.bouncycastle:bctls-jdk18on", version.ref = "bouncycastle" } mayakapps-window-styler = { module = "com.mayakapps.compose:window-styler", version.ref = "windowStyler" } microsoft-signalr = { module = "com.microsoft.signalr:signalr", version.ref = "signalr" } microsoft-signalr-messagepack = { module = "com.microsoft.signalr.messagepack:signalr-messagepack", version.ref = "signalr" }