SSLContext sslCtx;
try {
// Initialize the SSLContext to work with our key managers.
sslCtx = SSLContext.getInstance("TLS");
sslCtx.init(server.getKeyManagerFactory().getKeyManagers(), new TrustManager[]
{new TrustAndStoreTrustManager()}, new SecureRandom());
} catch (Exception e) {
throw new LdapException(I18n.err(I18n.ERR_683), e);
}
DefaultIoFilterChainBuilder chain = new DefaultIoFilterChainBuilder();