From a190fb6cf7be6ee575d48db2c74945a33464cbca Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Mon, 13 Mar 2023 15:00:37 +0100 Subject: [PATCH] Use own okHttpClient for coil ImageLoader This change will use the own okHttpClient which also contains the trusted key. It will avoid the SSLHandshakeException: E/RealImageLoader: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@224915028@22.49.15 (100400-499306216):25) at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379) at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337) Signed-off-by: Marcel Hibbe --- .../com/nextcloud/talk/application/NextcloudTalkApplication.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.kt b/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.kt index 130077d8c..569747409 100644 --- a/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.kt +++ b/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.kt @@ -255,6 +255,8 @@ class NextcloudTalkApplication : MultiDexApplication(), LifecycleObserver { imageLoaderBuilder.logger(DebugLogger()) } + imageLoaderBuilder.okHttpClient(okHttpClient) + return imageLoaderBuilder.build() }