|
|
|
components\camel-jetty\src\test\resources\jsse\localhost.ks a binary keystore file.
the contents of this file were created with: The cert is used by the https endpoint and made available to the clients via their truststore so that the server cert can be validated. The cert is self signed. This is a dummy cert that is useful only for testing. this patch superseeds the camel-409.patch file.
It adds an additional negative test for camel http component calling https endpoint and expects an exception. Gary thanks a lot for all the hard work creating such a patch. We will definitely add it to Camel.
Gary, I think is a good solution to set getter and setter methods for SslSocketConnector in JettyHttpComponent so that one can set (for example) the keystore path or anything else.
If you want to consider this suggestion I have attached file of jetty component with this patch implemented Micky, yea, that is a far better idea than replicating all of the Ssl attributes on JettyHttpComponent.
One thing to note is that in order for the jsse system properties to be picked up by the SssSocketConnector, a call to the setter methods is required, hense the default values of "" for the key and keystore passwords in the JettyHttpComponent. Without that we get the "no password" error. Best may be to lazily initialize the SslSocketConnector and call the setters if a user has not already provided an instance. Gary could you provide a final patch with your and Mickys latest suggesting included.
I will then be able to commit the patch. It is a great addition to Camel. adds sslsocketConnector accessor along with simple default sslPassword and sslKeyPassword that will solicit the default jetty behaviour of looking for jetty system properties or prompting the user.
If your config needs are simple, the accessors will work, if they are more complex, the ability to set the sslsocketconnector should be used. added another test that uses the sslsocketconnector accesor Comitted to trunk
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The keystore, localhost.ks is binary so it is not part of this patch.