mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 20:17:48 +01:00
Reenable cipher suites after upgrading to okhttp 3.10. Fixes #1411
This commit is contained in:
parent
75fc160204
commit
c6245f4fa3
2 changed files with 16 additions and 1 deletions
|
@ -154,7 +154,7 @@ dependencies {
|
||||||
implementation 'org.jsoup:jsoup:1.10.2'
|
implementation 'org.jsoup:jsoup:1.10.2'
|
||||||
|
|
||||||
// Job scheduling
|
// Job scheduling
|
||||||
implementation 'com.evernote:android-job:1.2.4'
|
implementation 'com.evernote:android-job:1.2.5'
|
||||||
implementation 'com.google.android.gms:play-services-gcm:11.8.0'
|
implementation 'com.google.android.gms:play-services-gcm:11.8.0'
|
||||||
|
|
||||||
// Changelog
|
// Changelog
|
||||||
|
|
|
@ -3,7 +3,10 @@ package eu.kanade.tachiyomi.network
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import okhttp3.Cache
|
import okhttp3.Cache
|
||||||
|
import okhttp3.CipherSuite
|
||||||
|
import okhttp3.ConnectionSpec
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.TlsVersion
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.net.InetAddress
|
import java.net.InetAddress
|
||||||
|
@ -108,6 +111,18 @@ class NetworkHelper(context: Context) {
|
||||||
sslSocketFactory(TLSSocketFactory(), trustManagers[0] as X509TrustManager)
|
sslSocketFactory(TLSSocketFactory(), trustManagers[0] as X509TrustManager)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val specCompat = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
|
||||||
|
.tlsVersions(TlsVersion.TLS_1_2, TlsVersion.TLS_1_1, TlsVersion.TLS_1_0)
|
||||||
|
.cipherSuites(
|
||||||
|
*ConnectionSpec.MODERN_TLS.cipherSuites().orEmpty().toTypedArray(),
|
||||||
|
CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
||||||
|
CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
val specs = listOf(specCompat, ConnectionSpec.CLEARTEXT)
|
||||||
|
connectionSpecs(specs)
|
||||||
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue