In android, if i get (SSLSocketFactory) SSLSocketFactory.getDefault() i get the inner socket factory with this class com.android.org.conscrypt.OpenSSLSocketFactoryImpl.
After adding this dependency
dependencies {
implementation 'org.conscrypt:conscrypt-android:2.2.1'
}
I want to get (SSLSocketFactory) SSLSocketFactory.getDefault() the factory from new lib (org.conscrypt.OpenSSLSocketFactoryImpl), but still geting the inner com.android.org.conscrypt.OpenSSLSocketFactoryImpl.
What is the integration algorithm for the new SocketFactory ?
You have to set the Conscrypt provider as first security provider, otherwise it will not be loaded:
Setting it as first provider will prevent Android from using the default one.