return ctx.getServerSocketFactory();
}
protected ServerSocket createServerSocket(int port, int backlog, String address) throws Exception {
ServerSocketFactory serverSocketFactory = createServerSocketFactory();
SSLServerSocket serverSocket = null;
if (address.equals("0.0.0.0")) {
serverSocket = (SSLServerSocket) serverSocketFactory.createServerSocket(port, backlog);
} else {
serverSocket = (SSLServerSocket) serverSocketFactory.createServerSocket(port, backlog, InetAddress.getByName(address));
}
// require mutual authentication
serverSocket.setNeedClientAuth(true);
// request mutual authentication