Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Not A Problem
-
8.0
-
None
-
None
Description
In SolrHttpClientBuilder, we can configure a lot of things including HostnameVerifier.
We have code like below:
HttpClientUtil.setHttpClientBuilder(new CommonNameVerifierClientConfigurer());
CommonNameVerifierClientConfigurer will set our own HostnameVerifier which checks subject dn name.
But this doesn't work as when we create SSLConnectionSocketFactory at HttpClientUtil.DefaultSchemaRegistryProvider.getSchemaRegistry() we don't check and use HostnameVerifier in SolrHttpClientBuilder at all.
The fix would be very simple, at HttpClientUtil.DefaultSchemaRegistryProvider.getSchemaRegistry, if HostnameVerifier in SolrHttpClientBuilder is not null, use it, otherwise same logic as before.