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; }
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; }
@Override protected SSLContextClientParameters createInstance() { SSLContextClientParameters newInstance = new SSLContextClientParameters(); newInstance.setCamelContext(getCamelContext()); return newInstance; }
@Override public Class<SSLContextClientParameters> getObjectType() { return SSLContextClientParameters.class; }