Writing my own ClientConfigurer did the trick. However it would be
interesting to see, if there is an alternative solution with the blueprint
sslContextParameters element.

Here is my Solution:

public class ESHttpClientConfigurer implements HttpClientConfigurer {

    private String resource;
    private String password;
    private int port = 9200;
    
    @Override
    public void configureHttpClient(HttpClient arg0) {
        KeyStoreParameters ksp = new KeyStoreParameters();
        ksp.setResource(resource);
        ksp.setPassword(password);

        TrustManagersParameters tmp = new TrustManagersParameters();
        tmp.setKeyStore(ksp);

        SSLContextParameters scp = new SSLContextParameters();
        scp.setTrustManagers(tmp);

        ProtocolSocketFactory factory = new
SSLContextParametersSecureProtocolSocketFactory(scp);

        Protocol.registerProtocol("https", new Protocol("https", factory,
port));

    }

    public void setResource(String resource) {
        this.resource = resource;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setPort(int port) {
        this.port = port;
    }

}



<bean id="esHttpClientConfigurer"
class="com.zurich.ch.iwf.ingest.ESHttpClientConfigurer">
    <property name="resource" value="${truststoreLocation}" />
    <property name="password" value="${truststorePassword}" />
    <property name="port" value="${elasticsearchPort}" />
</bean> 


<to
uri="{{elasticsearchURL}}/_bulk?httpClientConfigurerRef=esHttpClientConfigurer{{elasticsearchAuthParameter}}"/>



--
View this message in context: 
http://camel.465427.n5.nabble.com/SSL-Settings-for-http-component-in-blueprint-tp5799272p5799274.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to