We would like to know, in an application interceptor, if the user is using a custom SSLSocketFactory, i.e. they called OkHttpClient.Builder.sslSocketFactory or Interceptor.Chain.withSslSocketFactory.
This is because, if the user is using the default SSL Socket Factory, our interceptor can use its own SSL implementation with little risk of contradicting the user's intent. The interceptor should ideally refrain from doing this if the user overrode the option.
Currently this doesn't really seem to be feasible. Indeed, if the user does not specify this option, OkHttp sets the field to a new instance, which means Interceptor.chain.sslSocketFactoryOrNull cannot be compared against null or some default instance.
@yschimke @vkasprov
We would like to know, in an application interceptor, if the user is using a custom SSLSocketFactory, i.e. they called
OkHttpClient.Builder.sslSocketFactoryorInterceptor.Chain.withSslSocketFactory.This is because, if the user is using the default SSL Socket Factory, our interceptor can use its own SSL implementation with little risk of contradicting the user's intent. The interceptor should ideally refrain from doing this if the user overrode the option.
Currently this doesn't really seem to be feasible. Indeed, if the user does not specify this option, OkHttp sets the field to a new instance, which means
Interceptor.chain.sslSocketFactoryOrNullcannot be compared against null or some default instance.@yschimke @vkasprov