Is there any way to setup a separate SSL Context Factory for each route in
Apache HTTP Client. From the documentation i can only see we can configure
SSLContextFactory per scheme not per route.
Registry<ConnectionSocketFactory> r =
RegistryBuilder.<ConnectionSocketFactory>create()
.register("http", plainsf)
.register("https", sslsf)
.build();
HttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(r);
HttpClients.custom()
.setConnectionManager(cm)
.build();
All my target endpoints are protected with HTTPS and mandates client
certificate authentication. For each of these endpoint i have to select a
specific client certificate & present it to the endpoint server. Currently
i am seeing the only is to create a separate HTTPClient instance for each
target endpoint route.
I am here looking for any pointers to improving this design.
Thanks.