camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From preety somani <>
Subject camel http- to call https service does not import certificates automatically
Date Tue, 19 Mar 2013 12:23:38 GMT
public void configureHttpClient(HttpClient arg0) {
		String keystoreFilename = "C:\\Users\\.keystore";		

	    char[] password = "Password".toCharArray();"configureHttpClient"+arg0.getPort());
			  FileInputStream fIn = new FileInputStream(keystoreFilename);
			trustStore  = KeyStore.getInstance(KeyStore.getDefaultType());
	         sslProtocolsocketFactory = new SSLProtocolSocketFactory();
	         sslsocketFactory = new

	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:
Sent from the Camel - Users mailing list archive at

View raw message