code: public void addSslListener(InetSocketAddress addr, Configuration sslConf,
        boolean needClientAuth) throws IOException {
      if (webServer.isStarted()) {
        throw new IOException("Failed to add ssl listener");
      }
      if (needClientAuth) {
        // setting up SSL truststore for authenticating clients
        System.setProperty("javax.net.ssl.trustStore", sslConf.get(
            "ssl.server.truststore.location", ""));
        System.setProperty("javax.net.ssl.trustStorePassword", sslConf.get(
            "ssl.server.truststore.password", ""));
        System.setProperty("javax.net.ssl.trustStoreType", sslConf.get(
            "ssl.server.truststore.type", "jks"));
      }
      SslSocketConnector sslListener = new SslSocketConnector();
      sslListener.setHost(addr.getAddress().getHostAddress());
      sslListener.setPort(addr.getPort());
      sslListener.setKeystore(sslConf.get("ssl.server.keystore.location"));
      sslListener.setPassword(sslConf.get("ssl.server.keystore.password", ""));
      sslListener.setKeyPassword(sslConf.get("ssl.server.keystore.keypassword", ""));
      sslListener.setKeystoreType(sslConf.get("ssl.server.keystore.type", "jks"));
      sslListener.setNeedClientAuth(needClientAuth);
      webServer.addConnector(sslListener);
    }
docs: Configure an ssl listener on the server.
  @param addr address to listen on
  @param sslConf conf to retrieve ssl options
  @param needClientAuth whether client authentication is required