SslConfiguration ssl = getSslConfiguration();
SslFilter sslFilter;
try {
sslFilter = new SslFilter(ssl.getSSLContext());
} catch (GeneralSecurityException e) {
throw new FtpServerConfigurationException("SSL could not be initialized, check configuration");
}
if (ssl.getClientAuth() == ClientAuth.NEED) {
sslFilter.setNeedClientAuth(true);
} else if (ssl.getClientAuth() == ClientAuth.WANT) {
sslFilter.setWantClientAuth(true);
}
if (ssl.getEnabledCipherSuites() != null) {
sslFilter.setEnabledCipherSuites(ssl.getEnabledCipherSuites());
}
acceptor.getFilterChain().addFirst("sslFilter", sslFilter);
}
handler.init(context, this);
acceptor.setHandler(new FtpHandlerAdapter(context, handler));
try {
acceptor.bind(address);
} catch (IOException e) {
throw new FtpServerConfigurationException("Failed to bind to address " + address + ", check configuration", e);
}
updatePort();
} catch(RuntimeException e) {