Support TLS 1.2 for Android 4.4 on the 3.12.x branch
See original GitHub issueThe problem we’re trying to solve: disable TLS 1.0 and 1.1 on our web servers.
Due to the decision of OkHttp to support TLS 1.2 only on Android 5+, this will not be possible for several years to come. Like virtually any successful app, our app still supports Android 4.4. Even if some devs decide to go minSdk 5.x, they will usually maintain a separate version that runs on Android 4.x.
According to the SSL Labs test, Android 4.4 can do TLS 1.2 and there are instructions for how to activate it even back on JellyBean!
So my suggestion is to make it possible to use TLS 1.2 for Android 4.4 on the OkHttp 3.12.x branch. At least one common, reasonably secure cipher would be enough:
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014)
TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x33)
TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x39)
(all of these ciphers are available and enabled by default since Android 3.x.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
For the records, I managed to install the Conscrypt from Google Play Services with just these three lines of code (error handling omitted):
The logcat seems to indicate success, after ~330 ms:
However, there is still something missing on the OkHttp side. I still get the above exception.
I was testing this on an API 19 aosp x86 emulator image with com.google.android.gms version 19.6.29 manually installed.
n.b. You will likely be limited to HTTP/1.1. Conscrypt and HTTP/2 is on the 4.x branch IIRC.