Here is the code:
// create client
ftp = new SSLFTPClient();
// disable standard SSL closure
ftp.setConfigFlags(SSLFTPClient.ConfigFlags.DISABLE_SSL_CLOSURE);
// set remote host
ftp.setRemoteHost(host);
// turn off server validation
ftp.setValidateServer(false);
// connect to the server
cat.debug("attempting connect...");
ftp.connect();
cat.debug("are we connected? " + ftp.connected());
// switch to SSL on control channel
cat.debug("switching to SSL");
ftp.auth(SSLFTPClient.AUTH_TLS);
// log in
cat.debug("logging in with u: " + username + " p: " + password);
ftp.login(username, password);
// set up active binary transfers
ftp.setConnectMode(com.enterprisedt.net.ftp.FTPConnectMode.ACTIVE);
ftp.setType(FTPTransferType.BINARY);
// set timeout
ftp.setTimeout(timeout);
Here is the log file:
INFO [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.579 : edtFTPj - PRO version
DEBUG [com.enterprisedt.net.ftp.FTPClient] 17 Aug 2006 14:34:49.585 : Class: com.enterprisedt.net.ftp.ssl.SSLFTPClient
Version: 1.2.8
Build timestamp: 24-May-2006 12:04:20 EST
Java version: 1.4.2_09
CLASSPATH: :/usr/local/apache-tomcat-5.5.17/bin/bootstrap.jar:/usr/local/apache-tomcat-5.5.17/bin/commons-logging-api.jar
OS name: Linux
OS arch: i386
OS version: 2.4.21-40.ELsmp
INFO [com.enterprisedt.util.license.LicenseProperties] 17 Aug 2006 14:34:49.591 : Licence expiry date: 31 Dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 17 Aug 2006 14:34:49.591 : Production licence
INFO [puretls] 17 Aug 2006 14:34:49.635 : PureTLS debug level=0
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.638 : Setting custom validator to com.enterprisedt.net.ftp.ssl.SSLFTPStandardValidator
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.652 : Turned server validation off
DEBUG [com.intellicare.FTPS.FtpsHandler] 17 Aug 2006 14:34:49.652 : attempting connect...
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.652 : Created explicit FTPS client.
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.652 : Connecting to /192.168.253.76:21
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.709 : 220 ftps X2 WS_FTP Server 5.0.0 (443739523)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.714 : DISABLE_CONTROL_SSL_CLOSURE=false
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.714 : DISABLE_CONTROL_WAIT_ON_CLOSE=true
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.715 : ALLOW_BASIC_CONSTRAINTS_IN_NON_CA=false
DEBUG [com.intellicare.FTPS.FtpsHandler] 17 Aug 2006 14:34:49.715 : are we connected? true
DEBUG [com.intellicare.FTPS.FtpsHandler] 17 Aug 2006 14:34:49.715 : switching to SSL
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.715 : ---> AUTH TLS
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:50.266 : 234 SSL enabled and waiting for negotiation
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:50.267 : Starting SSL handshake on control socket
INFO [cryptix] 17 Aug 2006 14:34:50.342 : GLOBAL_TRACE=false
INFO [cryptix] 17 Aug 2006 14:34:50.342 : GLOBAL_DEBUG=false
INFO [cryptix] 17 Aug 2006 14:34:50.342 : GLOBAL_DEBUG_SLOW=false
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:51.763 : ---> QUIT
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:51.773 : ^UUI^@^B^BF530 Please login with USER and PASS
As you can see, my program fails BEFORE the line:
// log in
cat.debug("logging in with u: " + username + " p: " + password);
ftp.login(username, password);
What is going on?? This is the "pro" version, for which I have paid. Can I get some love here?
Thanks,
-Jack