Micky,
In terms of container, I am not using any. I was using just the JVM
based on one of the jetty unit tests.
A https variant of
https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpRouteTest.java
The changes to have a camel-jetty endpoint pick up a key store
password are now on trunk but you will need to build trunk your self
to pick them up. I need to research how best to manage certs for the
tests, before submitting the full test case that shows route round
trip with jetty:https
On 27/03/2008, Micky Santomax <[EMAIL PROTECTED]> wrote:
>
> Thanks Gary for your suggestion
>
> What type of container do you use ? I have tomcat and I've test the
> following route that you suggest, but the error persist :
> "java.security.UnrecoverableKeyException: Password must not be null"
>
>
>
> > I was able to use a browser to access the following route:
> >
> > Processor proc = new Processor() {
> > public void process(Exchange exchange) throws
> > Exception {
> > exchange.getOut(true).setBody("Hello World");
> > }
> > };
> > from("jetty:https://localhost:8080/hello").process(proc);
> >
>
>
> I have no modified the JettyHttpComponent, but set the SSLConnector and
> endpoint as follow :
>
> JettyHttpEndpoint jettyEndpoint =
> context.getEndpoint("jetty:https://localhost:8196/SSLTest/",
> JettyHttpEndpoint.class);
>
> SslSocketConnector ssl = new SslSocketConnector();
> ssl.setPort(8196);
> ssl.setMaxIdleTime(30000);
> ssl.setPassword("passwordString");
> ssl.setKeyPassword("passwordString");
> ssl.setTrustPassword("passwordString");
>
> BoundedThreadPool btp = new BoundedThreadPool();
> btp.setMaxThreads(250);
> btp.setMinThreads(10);
> btp.setLowThreads(10);
> btp.start();
>
> JettyHttpComponent componentJetty = (JettyHttpComponent)
> context.getComponent("jetty");
> Server serverJetty = componentJetty.getServer();
>
> serverJetty.addConnector(ssl);
> serverJetty.setThreadPool(btp);
>
> ssl.start();
>
> SSLTest sslTest = new SSLTest(jettyEndpoint); // RouteBuilder
> context.addRoutes(sslTest);
>
>
>
> > to create a jetty https endpoint that uses a password to access its
> > keystore I needed to modify the JettyHttpComponent as follows:
> >
> > Index:
> > src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
> > ===================================================================
> > --- src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
> > (revision 641579)
> > +++ src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
> > (working copy)
> > @@ -89,7 +89,10 @@
> > if (connectorRef == null) {
> > Connector connector;
> > if ("https".equals(endpoint.getProtocol())) {
> > - connector = new SslSocketConnector();
> > + SslSocketConnector sslConnector = new
> > SslSocketConnector();
> > + sslConnector.setPassword("");
> > + sslConnector.setKeyPassword("");
> > + connector = sslConnector;
> > } else {
> > connector = new SelectChannelConnector();
> > }
> >
> >
> > This allowed the SslSocketConnector to make use of the jetty system
> > properties for passwords: -Djetty.ssl.password=... and
> > -Djetty.ssl.keypassword=...
> > In the absence of the system properties, there is a prompt to StdIn.
> >
>
>
> PS How can I open a JIRA ?
> --
> View this message in context:
> http://www.nabble.com/Password-error-for-https-endpoint-connection-tp16128569s22882p16332255.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>