| Summary: | It should be possible to embed in the jetty.home.bundle the ssl keystore files | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Hugues Malphettes <hmalphettes> |
| Component: | osgi | Assignee: | Hugues Malphettes <hmalphettes> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | 7.2.1 | ||
| Target Milestone: | 7.3.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
This type of enhancement is in fact similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=318152 Although the code to support the enhancement is only related to the osgi bootstrapper. The simple enhancement is committed and working fine for Dmytro. Resolved -> Closed |
A typical jetty.xml that configures an SSL listener specifies the keystore as relative path to a file: <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector"> <Set name="Port"> <SystemProperty name="jetty.port" default="8443"/> </Set> <Set name="maxIdleTime">30000</Set> <Set name="Acceptors">2</Set> <Set name="AcceptQueueSize">100</Set> <Set name="Keystore">etc/mipkeystore.jks</Set> <Set name="needClientAuth">false</Set> <Set name="Password">mippassword</Set> <Set name="KeyPassword">mippassword</Set> <Set name="truststore">etc/cacerts.jks</Set> <Set name="trustPassword">mippassword</Set> </New> </Arg> </Call> In the case where this configuration file is inside a [jarred] bundle as the jetty.home.bundle; the mipkeystore won't be located. The enhancement consists of supporting this usecase by passing a new Property "this.jetty.xml.parent.folder.url" that resolves to the URL of the parent 'folder' of the jetty configuration file. So that: <Set name="Keystore"><Property name="this.jetty.xml.parent.folder.url"/>/etc/mipkeystore.jks</Set> is resolved as (for example) jar:file:/home/hmalphettes/proj/osgi-exp/tmp/dmytro-jettyhome/org.eclipse.jetty-config_0.19.0.SNAPSHOT.jar!/etc/mipkeystore.jks