Reputation: 2090
One of my company's APIs is being updated to use TLSv1.1 or higher. Unfortunately, Android 4.0 does not natively support those protocols.
I think it's possible; navigating to https://www.howsmyssl.com using Chrome on a 4.0 device shows that it's using TLSv1.2. I have seen some suggestions using SSLSocket (particularly this one), but they have not worked within my app. I also tried using ProviderInstaller.installIfNeeded() to add TLSv1.2 via Google Play Services; according to howsmyssl, the device was still using TLSv1.0.
Is there a way to add support for TLSv1.2 at runtime for Android 4.0?
Upvotes: 0
Views: 1732
Reputation: 2682
Android itself did not add TLSv1.1 or TLSv1.2 support until Android 4.1/android-16
so you'll have to use a library that does not rely on Android's SSLSocket
in order to get newer than TLSv1.0 on older Android releases. You can see what is officially supported by looking at the reference for SSLSocket.
The NetCipher library will provide HttpsURLConnection
instances that are configured with the best possible TLS settings for that Android version, but that still won't give you TLSv1.1 or TLSv1.2 on older than Android 4.1.
Upvotes: 2