// on its own based on internal configuration options. FTPSClient does not lend itself
// to subclassing for the purpose of overriding this behavior (private methods, fields, etc.).
// As such, we create a socket (preconfigured by SSLContextParameters) from the context
// we gave to FTPSClient and then setup FTPSClient to reuse the already configured configuration
// from the socket for all future sockets it creates. Not sexy and a little brittle, but it works.
SSLSocket socket = (SSLSocket)context.getSocketFactory().createSocket();
client.setEnabledCipherSuites(socket.getEnabledCipherSuites());
client.setEnabledProtocols(socket.getEnabledProtocols());
client.setNeedClientAuth(socket.getNeedClientAuth());
client.setWantClientAuth(socket.getWantClientAuth());
client.setEnabledSessionCreation(socket.getEnableSessionCreation());
} else {
client = new FTPSClient(getFtpsConfiguration().getSecurityProtocol(),
getFtpsConfiguration().isImplicit());
if (ftpClientKeyStoreParameters != null) {