Search in sources :

Example 1 with SSLContextClientParameters

use of org.apache.camel.util.jsse.SSLContextClientParameters in project wildfly-camel by wildfly-extras.

the class CXFWSSecureConsumerIntegrationTest method createSSLContextParameters.

private SSLContextParameters createSSLContextParameters() {
    KeyStoreParameters ksp = new KeyStoreParameters();
    ksp.setResource(System.getProperty("jboss.server.config.dir") + "/application.keystore");
    ksp.setPassword("password");
    KeyManagersParameters kmp = new KeyManagersParameters();
    kmp.setKeyStore(ksp);
    kmp.setKeyPassword("password");
    SSLContextClientParameters sslContextClientParameters = new SSLContextClientParameters();
    SSLContextParameters sslContextParameters = new SSLContextParameters();
    sslContextParameters.setClientParameters(sslContextClientParameters);
    sslContextParameters.setKeyManagers(kmp);
    TrustManagersParameters tmp = new TrustManagersParameters();
    tmp.setKeyStore(ksp);
    sslContextParameters.setTrustManagers(tmp);
    return sslContextParameters;
}
Also used : KeyManagersParameters(org.apache.camel.util.jsse.KeyManagersParameters) TrustManagersParameters(org.apache.camel.util.jsse.TrustManagersParameters) KeyStoreParameters(org.apache.camel.util.jsse.KeyStoreParameters) SSLContextClientParameters(org.apache.camel.util.jsse.SSLContextClientParameters) SSLContextParameters(org.apache.camel.util.jsse.SSLContextParameters)

Example 2 with SSLContextClientParameters

use of org.apache.camel.util.jsse.SSLContextClientParameters in project camel by apache.

the class AbstractSSLContextClientParametersFactoryBean method createInstance.

@Override
protected SSLContextClientParameters createInstance() {
    SSLContextClientParameters newInstance = new SSLContextClientParameters();
    newInstance.setCamelContext(getCamelContext());
    if (sniHostNamesDefinition != null) {
        newInstance.addAllSniHostNames(sniHostNamesDefinition.getSniHostName());
    }
    return newInstance;
}
Also used : SSLContextClientParameters(org.apache.camel.util.jsse.SSLContextClientParameters)

Aggregations

SSLContextClientParameters (org.apache.camel.util.jsse.SSLContextClientParameters)2 KeyManagersParameters (org.apache.camel.util.jsse.KeyManagersParameters)1 KeyStoreParameters (org.apache.camel.util.jsse.KeyStoreParameters)1 SSLContextParameters (org.apache.camel.util.jsse.SSLContextParameters)1 TrustManagersParameters (org.apache.camel.util.jsse.TrustManagersParameters)1