THE JETTY SSL CONNECTORS
There are 2 ssl connectors in jetty-- SslSocketConnector and the SslSelectChannelConnector. The SslSocketConnector is built on top of the Jetty SocketConnector which is Jetty's implementation of a blocking connector. It makes use of java's SslSocket to add the security layer. On the other hand, SslSelectChannelConnector is an extension of Jetty's SelectChannelConnector which makes use of non-blocking IO. For its security layer, it uses java nio SslEngine. Both Connectors can be configured in the same way. Only difference is in the implementation.
The following is an example of an SslSocketConnector configuration. An SslSelectChannelConnector may be configured the same way-- just change the value of class to "org.mortbay.jetty.security.SslSelectChannelConnector".
If there is no value for "keyPassword" and "trustPassword", the ssl connector will use the value specified for "password". If there is no value for the "truststore", it will use the "keystore" value.
Other properties which can be set for SslSocketConnector/SslSelectChannelConnector are:
- keystoreType - default value: "JKS"
- trustStoreType - default value: "JKS"
- sslKeyManagerFactoryAlgorithm - set to the value of the "ssl.KeyManagerFactory.algorithm" system property. If there is no such property, this defaults to "SunX509"
- sslTrustManagerFactoryAlgorithm - set to the value of the "ssl.TrustManagerFactory.algorithm" system property. If there is no such property, this defaults to "SunX509"
- secureRandomAlgorithm - default value is null
- provider - defaults to the SunJSSE provider
- protocol - default value is "TLS"
- excludeCipherSuites - see SSL+Cipher+Suites