All,
I'm trying to modify the below code to use a self signed of CA signed
certificate with a jetty endpoint. I've gotten it to work with a key that I
generated and I'm prompted to accept the certificate manually. However I
need it to work in either circumstance without any manual intervention. The
endpoint will be accessed by another internal application, not directly by a
user. I generated the self-signed cert using the following method,
https://blogs.oracle.com/blogbypuneeth/entry/steps_to_create_a_self. Any
examples that are out there? I found code at
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
that I'm looking at currently to see if this is useful. Below is code that
I'm currently using to get manual acceptance with a generated key, and
directly hitting the endpoint (i.e. not through the application).
Thanks,
Dennis...
*
private Endpoint configureSslForJetty(Properties sslParameters) throws
Exception {
KeyStoreParameters ksp = new KeyStoreParameters();
ksp.setResource(sslParameters.getProperty("sslKey"));
ksp.setPassword(sslParameters.getProperty("resourcePassword"));
KeyManagersParameters kmp = new KeyManagersParameters();
kmp.setKeyStore(ksp);
kmp.setKeyPassword(sslParameters.getProperty("storePassword"));
SSLContextServerParameters scsp = new
SSLContextServerParameters();
scsp.setClientAuthentication(ClientAuthentication.REQUIRE.toString());
SSLContextParameters scp = new SSLContextParameters();
scp.setServerParameters(scsp);
scp.setKeyManagers(kmp);
JettyHttpComponent jettyComponent =
getContext().getComponent("jetty",
JettyHttpComponent.class);
jettyComponent.setSslContextParameters(scp);
return (Endpoint) jettyComponent
.createEndpoint(sslParameters.getProperty("endPointURL"));
}
*
--
View this message in context:
http://camel.465427.n5.nabble.com/self-signing-certificate-with-jetty-component-tp5772495.html
Sent from the Camel - Users mailing list archive at Nabble.com.