camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: HTTPS authentication setup using camel-http
Date Wed, 04 Nov 2009 03:10:51 GMT
I think we should move this discussion into camel-user mail list to get 
more feed back :)

Basically, camel-http component is built on the top of http client, and 
you can use implement your customer 
org.apache.camel.component.http.HttpClientConfigurer to do some 
configuration on the http client.

If you just wan to specify the keystore and truststore you can do int in 
your HttpClientConfigurer.

Protocol authhttps = new Protocol("https",
new AuthSSLProtocolSocketFactory(
new URL("file:my.keystore"), "mypassword",
new URL("file:my.truststore"), "mypassword"), 443);
Protocol.registerProtocol("https", authhttps);

Willem wrote:
> Hi Willem,
> I need to setup SSL authentication for a camel-http client I have. Specifically, I need
to specify the keystore name and password (just like you can do with servicemix-http's new
endpoints using the SslParameters class).
> I have not been able to find any documentation on how I can do this. Can you please give
me a code example, or point me to the correct documentation if available?
> I suspect this can be done using something like .setHeader(SomeConstants.KEYSTORE_PASSWORD,
"xyz") in the camel route, but I don't know which constants are available.
> Thanks!
> Bryan

View raw message