public void configureHttpClient(HttpClient arg0) {
String keystoreFilename = "C:\\Users\\.keystore";
char[] password = "Password".toCharArray();
log.info("configureHttpClient"+arg0.getPort());
FileInputStream fIn = new
FileInputStream(keystoreFilename);
trustStore =
KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(fIn,password);
sslProtocolsocketFactory = new SSLProtocolSocketFactory();
sslsocketFactory = new
SSLSocketFactory(trustStore,"changeit",trustStore);
SchemeRegistry schemeReg = new SchemeRegistry();
schemeReg.register(new
Scheme("https",sslsocketFactory,8443));
Protocol authhttps;
authhttps = new Protocol("https",sslProtocolsocketFactory, 8443);
Protocol.registerProtocol("https", authhttps);
Protocol.registerProtocol("https", authhttps);
log.debug("authhtps: scheme"+authhttps.getScheme());
}
I have written my httpclientconfigurer class which implements
httpclientconfigurer. I have also added this in the camelcontext endpoint
as httpClientConfigurerRef=myClientConfigurerClass. But this does not import
the certificates automatically . It only hits the services whose
certificates I have imported manually to my keystore.
Can someone tell me why this does not work?
--
View this message in context:
http://camel.465427.n5.nabble.com/camel-http-to-call-https-service-does-not-import-certificates-automatically-tp5729413.html
Sent from the Camel - Users mailing list archive at Nabble.com.