Commons Net
  1. Commons Net
  2. NET-426

FTPS: Hook to customize _openDataConnection_ SSLSocket before startHandshake() is called

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1, 3.2
    • Component/s: FTP
    • Labels:
      None

      Description

      Currently in FTPSClient class, there is protected openDataConnection method, which create SSLSocket for data connection. But there is no hook to customize the SSLSocket before startHandshake is called.

      I need to know the remote host ip and port, which i can get for socket, and do custom setup to try to reuse SSL sessions from control connection socket. Since the socket factory uses createSocket() method, I can't just use custom socket factory since I don't know the host and port. I can't just override the openDataConnection() method in my class since that will call the startHandshake().

      So it would be nice if you can provide hook, much like connectAction(), but for data connection before handshake is started. You can pass the new data socket as argument to this hook method so one can get remote host and port information.

      1. FTPSClient.patch
        2 kB
        Ketan
      2. FTPSClient.patch
        0.8 kB
        Ketan

        Issue Links

          Activity

          Ketan created issue -
          Ketan made changes -
          Field Original Value New Value
          Attachment FTPSClient.patch [ 12500353 ]
          Sebb made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.1 [ 12317744 ]
          Resolution Fixed [ 1 ]
          Sebb made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Ketan made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Sebb made changes -
          Priority Critical [ 2 ] Major [ 3 ]
          Ketan made changes -
          Attachment FTPSClient.patch [ 12539894 ]
          Sebb made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s 3.2 [ 12320140 ]
          Resolution Fixed [ 1 ]
          Joerg Schaible made changes -
          Link This issue relates to NET-408 [ NET-408 ]
          Sebb made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Ketan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development