Jetty 9.x SSL Setup

Posted by

Download Jetty 9.X from

Create self signed certificate using Keytool or you can use the default keystore that comes packaged with jetty (module/ssl/keystore)

keytool -genkey -keyalg RSA -alias tomcat -keystore keystore -validity -keysize 2048

Verify contents using below:

keytool -list -v -keystore keystore

Modify start.ini file which is in JETTY_HOME directory.

- Comment below line

- Add below lines

Navigate to the JETTY_HOME/lib folder.

Run following Java command :

java -cp jetty-util-9.2.11.X.jar *******


Copy the generated password, which is the line starting with OBF (in this example OBF:1igd1l8d1l1a1uh21ugo1kxs1l4x1idt).

Modify ssl.mod in JETTY_HOME/modules directory


Start Jetty Server from bin directory

./ start

2017-01-24 15:32:58.725:INFO:oejs.AbstractConnector:main: Started ServerConnector@701fc37a{SSL,[ssl, http/1.1]}{}
2017-01-24 15:32:58.726:INFO:oejs.Server:main: Started @1485ms
OK Tue Jan 24 15:33:01 IST 2017

Access the service in browser using https://localhost:8443

To Enable Mutual Auth

## whether client certificate authentication is required

## Whether client certificate authentication is desired

Leave a Reply

Your email address will not be published.