Skip to content

Instantly share code, notes, and snippets.

@jucemar-dimon
Last active October 19, 2019 21:35
Show Gist options
  • Save jucemar-dimon/2b658361f3089fdf06a99b5d85a1f530 to your computer and use it in GitHub Desktop.
Save jucemar-dimon/2b658361f3089fdf06a99b5d85a1f530 to your computer and use it in GitHub Desktop.
This adds support to use Conscrypt as Security Provider if available runtime. Consscrypt supports TLS 1.2 on Android 4.x and TLS 1.3 on all Android versions. Fixes issues (ex #23151) with HTTPS connections on Android 4.x.
Just add below to your project build.gradle and it'll use it:
implementation('org.conscrypt:conscrypt-android:2.0.0')
Workaround:
Please copy and paste below code in onCreate method of MyApplication.java:
Security.insertProviderAt(new org.conscrypt.OpenSSLProvider(), 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment