                                         InstrumentedQueuedThreadPool
                                         InstrumentedHandler]
            [org.eclipse.jetty.http HttpVersion]
-           [org.eclipse.jetty.server HttpConfiguration HttpConnectionFactory
-                                     SslConnectionFactory ServerConnector
-                                     Request Server]
+           [org.eclipse.jetty.server HttpConfiguration ConnectionFactory
+                                     HttpConnectionFactory SslConnectionFactory
+                                     ServerConnector Request
+                                     Server SecureRequestCustomizer]
            [org.eclipse.jetty.server.handler RequestLogHandler HandlerCollection]
            [org.eclipse.jetty.util.component AbstractLifeCycle LifeCycle]
            [org.eclipse.jetty.util.ssl SslContextFactory]
            [org.eclipse.jetty.util.thread QueuedThreadPool ShutdownThread]))
+
+(def common-rsa-ssl-protocols ["TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
+                               "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA"
+                               "TLS_RSA_WITH_AES_128_CBC_SHA"
+                               "SSL_RSA_WITH_3DES_EDE_CBC_SHA"])
 
 (gen-class
  :extends org.eclipse.jetty.server.handler.AbstractHandler

  supplied options:

  :configurator        - a function called with the Jetty Server instance
  :port                - the port to listen on (defaults to 80)
  :host                - the hostname to listen on
  :join?               - blocks the thread until server ends (defaults to true)
  :ssl?                - allow connections over HTTPS
  :ssl-port            - the SSL port to listen on (defaults to 443, implies :ssl?)
  :keystore            - the keystore to use for SSL connections
  :key-password        - the password to the keystore
  :truststore          - a truststore to use for SSL connections
  :trust-password      - the password to the truststore
  :max-threads         - the maximum number of threads to use (default 50)
  :client-auth         - SSL client certificate authenticate, may be set to :need,
                         :want or :none (defaults to :none)

  (let [ssl-connection-factory (SslConnectionFactory. (ssl-context-factory options)
                                                      (.toString HttpVersion/HTTP_1_1))
        instr-conn-factory (InstrumentedConnectionFactory. ssl-connection-factory
                                                           (connection-timer "Ssl"))
        https-config (doto (HttpConfiguration.)
                       (.addCustomizer (SecureRequestCustomizer.)))
        http-conn-factory (HttpConnectionFactory. https-config)]
    (doto (ServerConnector. server (into-array ConnectionFactory [instr-conn-factory http-conn-factory]))
      (.setPort (options :ssl-port 443))
      (.setHost (options :host)))))

