commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1374495 - in /commons/proper/net/trunk/src: changes/changes.xml main/java/org/apache/commons/net/ftp/FTPSClient.java
Date Sat, 18 Aug 2012 01:17:53 GMT
Author: sebb
Date: Sat Aug 18 01:17:52 2012
New Revision: 1374495

URL: http://svn.apache.org/viewvc?rev=1374495&view=rev
Log:
NET-426 FTPS: Hook to customize _openDataConnection_ SSLSocket before startHandshake() is
called
Properly interface with FTPClient.openDataConnection(String, String)

Modified:
    commons/proper/net/trunk/src/changes/changes.xml
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPSClient.java

Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1374495&r1=1374494&r2=1374495&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Sat Aug 18 01:17:52 2012
@@ -65,6 +65,11 @@ The <action> type attribute can be add,u
         <release version="3.2" date="TBA" description="
 TBA
         ">
+            <action issue="NET-426" dev="sebb" type="fix" due-to="Ketan">
+            FTPS: Hook to customize _openDataConnection_ SSLSocket before startHandshake()
is called.
+            Implement _openDataConnection(String, String) method to properly
+            interface with FTPClient.openDataConnection(String, String)
+            </action>
             <action issue="NET-456" dev="sebb" type="fix">
             TelnetClient hangs when reader-thread startup is delayed.
             </action>

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPSClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPSClient.java?rev=1374495&r1=1374494&r2=1374495&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPSClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPSClient.java Sat
Aug 18 01:17:52 2012
@@ -572,6 +572,26 @@ public class FTPSClient extends FTPClien
     @Override
     protected Socket _openDataConnection_(int command, String arg)
             throws IOException {
+        return _openDataConnection_(FTPCommand.getCommand(command), arg);
+    }
+
+   /**
+     * Returns a socket of the data connection.
+     * Wrapped as an {@link SSLSocket}, which carries out handshake processing.
+     * @param command The textual representation of the FTP command to send.
+     * @param arg The arguments to the FTP command.
+     * If this parameter is set to null, then the command is sent with
+     * no arguments.
+     * @return corresponding to the established data connection.
+     * Null is returned if an FTP protocol error is reported at any point
+     * during the establishment and initialization of the connection.
+     * @throws IOException If there is any problem with the connection.
+     * @see FTPClient#_openDataConnection_(int, String)
+     * @since 3.2
+     */
+    @Override
+    protected Socket _openDataConnection_(String command, String arg)
+            throws IOException {
         Socket socket = super._openDataConnection_(command, arg);
         _prepareDataSocket_(socket);
         if (socket instanceof SSLSocket) {



Mime
View raw message