commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rory Winston (JIRA)" <j...@apache.org>
Subject [jira] Closed: (NET-235) 522 Data connections must be encrypted.
Date Sat, 07 Feb 2009 10:23:00 GMT

     [ https://issues.apache.org/jira/browse/NET-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rory Winston closed NET-235.
----------------------------

    Resolution: Invalid

If the server is set to force data connections to be encrypted, then the client can issue
a PROT command to encrypt data connections. See the example:

public static void main(String[] args) throws IOException, NoSuchAlgorithmException {
		FTPSClient client = new FTPSClient();
		client.connect("127.0.0.1");
		client.execPROT("P"); // encrypt data channel
		if (client.login("rory", "pass")) {
			for (FTPFile file : client.listFiles()) {
				System.out.println(file.getName());
			}
		}
		else {
			System.out.err(client.getReplyString());
		}
	}

> 522 Data connections must be encrypted.
> ---------------------------------------
>
>                 Key: NET-235
>                 URL: https://issues.apache.org/jira/browse/NET-235
>             Project: Commons Net
>          Issue Type: Test
>    Affects Versions: 2.0
>            Reporter: Roy F. Donasco
>
> 1. I tried FTPSExample.java
> 2. My parameters will try to download a file securely from an ubuntu vsftpd server with
the following secure configuration 
> ocal_enable=YES
> rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
> rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
> ssl_enable=YES
> force_local_logins_ssl=YES
> force_local_data_ssl=YES
> ssl_tlsv1=YES
> ssl_sslv2=YES
> ssl_sslv3=YES
> 3. When I run the test, i got the following message from the console
> 522 Data connections must be encrypted.
> 4. I checked the file downloaded and it's size is zero.
> 5. I tried reconfiguring the ftp server and set the parameter force_local_data_ssl=NO,
then tried the test again. this time the download is successful.
> is this a bug, that when we force data connection to use SSL will always fail?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message