Java 类org.apache.camel.util.jsse.SSLContextClientParameters 实例源码

项目:wildfly-camel-examples    文件:Application.java   
private SSLContextParameters createProducerSSLContextParameters() {
    KeyStoreParameters ksp = new KeyStoreParameters();
    ksp.setResource(KEYSTORE_PATH);
    ksp.setPassword(KEYSTORE_PASSWORD);

    KeyManagersParameters kmp = new KeyManagersParameters();
    kmp.setKeyStore(ksp);
    kmp.setKeyPassword(KEYSTORE_PASSWORD);

    SSLContextClientParameters sslContextClientParameters = new SSLContextClientParameters();
    SSLContextParameters sslContextParameters = new SSLContextParameters();
    sslContextParameters.setClientParameters(sslContextClientParameters);
    sslContextParameters.setKeyManagers(kmp);
    sslContextParameters.setCertAlias(TRUSTSTORE_ALIAS_NAME);

    // so that the client trusts the self-signed server certificate
    TrustManagersParameters tmp = new TrustManagersParameters();
    tmp.setKeyStore(ksp);
    sslContextParameters.setTrustManagers(tmp);

    return sslContextParameters;
}
项目:wildfly-camel    文件:CXFWSSecureConsumerIntegrationTest.java   
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;
}
项目:Camel    文件:AbstractSSLContextClientParametersFactoryBean.java   
@Override
protected SSLContextClientParameters createInstance() {
    SSLContextClientParameters newInstance = new SSLContextClientParameters();
    newInstance.setCamelContext(getCamelContext());
    return newInstance;
}
项目:Camel    文件:AbstractSSLContextClientParametersFactoryBean.java   
@Override
public Class<SSLContextClientParameters> getObjectType() {
    return SSLContextClientParameters.class;
}