Esempio n. 1
0
 /**
  * Gets a server socket - this gets as SSL socket instead of the standard socket returned in the
  * base class.
  */
 protected ServerSocket getServerSocket() throws IOException {
   // Just to make sure it's set before we start
   SSLContext context = getSSLContext(this.keystore, this.password);
   SSLServerSocketFactory factory = context.getServerSocketFactory();
   SSLServerSocket ss =
       (SSLServerSocket)
           (this.listenAddress == null
               ? factory.createServerSocket(this.listenPort, BACKLOG_COUNT)
               : factory.createServerSocket(
                   this.listenPort, BACKLOG_COUNT, InetAddress.getByName(this.listenAddress)));
   ss.setEnableSessionCreation(true);
   ss.setWantClientAuth(true);
   return ss;
 }
 public void setEnableSessionCreation(boolean flag) {
   s.setEnableSessionCreation(flag);
 }