Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.4k views
in Java FTP by (300 points)
I am looking for a Java example of how to use a different cipher. I have tried the following but I keep getting an error. Is there something wrong with my syntax?


ftp.enableCipherSuite(SSLFTPCipherSuite.TLS_RSA_WITH_RC4_128_SHA);

The error I get is
INFO [com.egateway.MF.V38.wmPush2MF_v38] 21 Jul 2011 12:46:10.280 : This is an info message
CLIENT KEY FILENAME EDIXFTP_SD.pem
java.lang.NullPointerException
at com.egateway.MF.V38.wmPush2MF_v38.main(wmPush2MF_v38.java:70)

3 Answers

0 votes
by (47.1k points)
That stack-trace indicates that the error is in the main method of the class called com.egateway.MF.V38.wmPush2MF_v38. What makes you think that it originates in our code?

- Hans (EnterpriseDT)
0 votes
by (300 points)
Hi Han,

Thank you for the reply. I am just trying to get clarifiation on the correct syntax. We are currently a customer and are evaluting an update to the most recent version. If we can solve a slow FTPs file transfer problem we would purchase new support and upgrades. Is there any example of how to use to change or enable the cipher. We are not a java shop and the documentation is not clear for us.

Roy
0 votes
by (47.1k points)
This ticket was responded to by Bruce in a private support ticket:
Here's the code I've used successfully:

client = new SSLFTPClient();
client.setValidateServer(false);
client.setRemoteHost(host);
client.disableAllCipherSuites();
client.enableCipherSuite(SSLFTPCipherSuite.TLS_RSA_WITH_RC4_128_SHA);
client.connect();
client.auth(SSLFTPClient.AUTH_TLS);
client.login(user, password);


Just a couple of other things:

- ASCII transfers will always be slower than binary
- try a transfer buffer size of say 4096 bytes, 64K bytes and 128K bytes
- try Filezilla as a comparison, and try FZ's fastest cipher

Categories

...