private void enableDataChannelProtection()

in deploy-runner-agent/src/main/java/jetbrains/buildServer/deployer/agent/ftp/FtpBuildProcessAdapter.java [215:228]


  private void enableDataChannelProtection(FTPClient client, DataChannelProtection dcp) throws IOException {
    try {
      FTPSClient ftpsClient = (client instanceof FTPSClient) ? (FTPSClient)client : null;
      if (ftpsClient != null) {
        long bufferSize = ftpsClient.parsePBSZ(PBSZ);
        ftpsClient.execPROT(dcp.getCodeAsString());
        myLogger.message("Negotiated " + bufferSize + " PBSZ buffer size" + ftpsClient.getReplyString());
      }
    } catch (SSLException e) {
      if (e.getMessage().contains("536 PROT not supported")) {
        myLogger.warning("Failed to setup data channel protection. Looks like target's FTPS server does not support PROT command.");
      }
    }
  }