diff --git a/desktopApp/build.gradle.kts b/desktopApp/build.gradle.kts index 8f52de15..6c26dd5b 100644 --- a/desktopApp/build.gradle.kts +++ b/desktopApp/build.gradle.kts @@ -21,6 +21,7 @@ kotlin { implementation(compose.materialIconsExtended) implementation(compose.desktop.currentOs) implementation(compose.components.resources) + implementation(libs.conscrypt.openjdk) 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 31d6e85e..8be1dd74 100644 --- a/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt +++ b/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt @@ -70,6 +70,7 @@ import kotlinx.coroutines.flow.mapLatest import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import kotlinx.datetime.Clock +import org.conscrypt.Conscrypt import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.resources.stringResource import org.kodein.di.DI @@ -79,10 +80,17 @@ import org.kodein.di.compose.rememberInstance import org.kodein.di.compose.withDI import org.kodein.di.direct import org.kodein.di.instance +import java.security.Security import java.util.Locale import kotlin.reflect.KClass fun main() { + // Add Conscrypt 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) + val kamelConfig = KamelConfig { this.takeFrom(KamelConfig.Default) mapper(FaviconUrlMapper) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9b6c2daa..0415b68d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -55,6 +55,7 @@ commonsLang3 = "3.14.0" composeMultiplatform = "1.6.20-dev1673" # https://github.com/DevSrSouza/compose-icons composeOpenIcons = "1.1.0" +conscrypt = "2.5.2" crashlyticsPlugin = "3.0.2" firebase = "33.1.1" # https://github.com/tfcporciuncula/flow-preferences @@ -184,6 +185,7 @@ cash-sqldelight-coroutines-extensions = { module = "app.cash.sqldelight:coroutin cash-sqldelight-sqlite-driver = { module = "app.cash.sqldelight:sqlite-driver", version.ref = "sqldelight" } commons-codec = { module = "commons-codec:commons-codec", version.ref = "commonsCodec" } commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commonsLang3" } +conscrypt-openjdk = { module = "org.conscrypt:conscrypt-openjdk-uber", version.ref = "conscrypt" } devsrsouza-feather = { module = "br.com.devsrsouza.compose.icons:feather", version.ref = "composeOpenIcons" } firebase-analytics-ktx = { module = "com.google.firebase:firebase-analytics-ktx" } firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase" }