* @return the server socket
*/
public static ServerSocket createServerSocket(int port, InetAddress bindAddress) throws IOException {
ServerSocket socket = null;
setKeystore();
ServerSocketFactory f = SSLServerSocketFactory.getDefault();
SSLServerSocket secureSocket;
if (bindAddress == null) {
secureSocket = (SSLServerSocket) f.createServerSocket(port);
} else {
secureSocket = (SSLServerSocket) f.createServerSocket(port, 0, bindAddress);
}
if (SysProperties.ENABLE_ANONYMOUS_SSL) {
String[] list = secureSocket.getEnabledCipherSuites();
list = addAnonymous(list);
secureSocket.setEnabledCipherSuites(list);