[jira] [Updated] (NET-354) FTPSClient not properly supporting CCC and PROT P

2011-04-13 Thread Erick Lichtas (JIRA)

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

Erick Lichtas updated NET-354:
--

Attachment: CCCTester.java

Sample program to connect to an FTPS server, set the data channel protection 
level, run the CCC command, and list the home directory.

 FTPSClient not properly supporting CCC and PROT P
 -

 Key: NET-354
 URL: https://issues.apache.org/jira/browse/NET-354
 Project: Commons Net
  Issue Type: Bug
  Components: FTP
Affects Versions: 2.2
 Environment: Applies to all environments
Reporter: Leif John Korshavn
 Fix For: 3.0

 Attachments: CCCTester.java, CCC_bugs_in_FTPSClient.patch


 FTPSClient does not behave properly after issuing CCC (Clear Command 
 Channel). Proper behaviour is to close SSLSocket, but keep underlying 
 connection without SSL open.
 To achieve this, the SSLSocket should be created with false, like this on 
 line 255 (of FTPSClient v2.2)
 SSLSocket socket =
 (SSLSocket) ssf.createSocket(_socket_, ip, port, false);
 Furthermore, on sendCommand CCC, sslSocket must be closed before setting 
 _socket = _plainsocket on line 493:
_socket.close();
_socket = _plainsocket;
...
 And finally, it is wrong to set socket factory to null on line 500 of the 
 same method; this is set properly in exexPROT and should not be reset on CCC.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] Updated: (NET-354) FTPSClient not properly supporting CCC and PROT P

2011-02-09 Thread Leif John Korshavn (JIRA)

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

Leif John Korshavn updated NET-354:
---

Attachment: CCC_bugs_in_FTPSClient.patch

Attached a patch to fix the aforementioned errors.

 FTPSClient not properly supporting CCC and PROT P
 -

 Key: NET-354
 URL: https://issues.apache.org/jira/browse/NET-354
 Project: Commons Net
  Issue Type: Bug
  Components: FTP
Affects Versions: 2.2
 Environment: Applies to all environments
Reporter: Leif John Korshavn
 Attachments: CCC_bugs_in_FTPSClient.patch


 FTPSClient does not behave properly after issuing CCC (Clear Command 
 Channel). Proper behaviour is to close SSLSocket, but keep underlying 
 connection without SSL open.
 To achieve this, the SSLSocket should be created with false, like this on 
 line 255 (of FTPSClient v2.2)
 SSLSocket socket =
 (SSLSocket) ssf.createSocket(_socket_, ip, port, false);
 Furthermore, on sendCommand CCC, sslSocket must be closed before setting 
 _socket = _plainsocket on line 493:
_socket.close();
_socket = _plainsocket;
...
 And finally, it is wrong to set socket factory to null on line 500 of the 
 same method; this is set properly in exexPROT and should not be reset on CCC.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira