Class SSLFTPClient.ConfigFlags

java.lang.Object
com.enterprisedt.net.ftp.ssl.SSLFTPClient.ConfigFlags
Enclosing class:
SSLFTPClient

public static class SSLFTPClient.ConfigFlags extends Object
ConfigFlags contains various static integers which are used to configure clients. Apart from the IMPLICIT_FTPS flag, all flags are used to enable non-standard behaviour, which is sometimes necessary when connecting to servers that don't comply fully with the standard.

Examples:

  1. ProFTPD FTP servers (at least until version 1.2.9) don't close SSL connections on the data-channel in the standard way, so clients connecting to servers of this type must use the DISABLE_DATA_WAIT_ON_CLOSE flag. The control channel closure conforms to the standard.
  2. GlobalSCAPE (tm) FTP servers (at least until late 2003) don't close SSL connections on the control and data channels in the standard way, so client connecting to servers of this type must use the DISABLE_SSL_CLOSURE flag.
Combinations of these flags may be passed to SSLFTPClient instances via setConfigFlags.
Author:
Hans Andersen
  • Field Details

    • DISABLE_CONTROL_SSL_CLOSURE

      public static final int DISABLE_CONTROL_SSL_CLOSURE
      Disables standard SSL closure on the control channel forcing SSL connections to close in a non-standard (and insecure) manner. This flag may be useful if it is found that the client or the server (or both) freezes when the FTP connection is closed.

      Note that it is unnecessary to use the DISABLE_CONTROL_WAIT_ON_CLOSE when using this flag.

      See Also:
    • DISABLE_DATA_SSL_CLOSURE

      public static final int DISABLE_DATA_SSL_CLOSURE
      Disables standard SSL closure on the data channel forcing SSL connections to close in a non-standard (and insecure) manner. This flag may be useful if it is found that the client or the server (or both) freezes after a data-transfer has completed.

      Note that it is unnecessary to use the DISABLE_DATA_WAIT_ON_CLOSE when using this flag.

      See Also:
    • DISABLE_SSL_CLOSURE

      public static final int DISABLE_SSL_CLOSURE
      Disables standard SSL closure forcing on both data and control channels SSL connections to close in a non-standard (and insecure) manner. This flag may be useful if it is found that the client or the server (or both) freezes after a data-transfer or when the FTP connection is closed.

      Note that it is unnecessary to use the DISABLE_WAIT_ON_CLOSE when using this flag.

      See Also:
    • DISABLE_CONTROL_WAIT_ON_CLOSE

      public static final int DISABLE_CONTROL_WAIT_ON_CLOSE
      Stops the client waiting for an SSL closure acknowledgement on the control channel. This flag may be useful if it is found that the client freezes when the FTP connection is closed.

      Note that it is unnecessary to use this flag when the DISABLE_CONTROL_SSL_CLOSURE flag is on.

      See Also:
    • DISABLE_DATA_WAIT_ON_CLOSE

      public static final int DISABLE_DATA_WAIT_ON_CLOSE
      Stops the client waiting for an SSL closure acknowledgement on the data channel. This flag may be useful if it is found that the client freezes after a data-transfer.

      Note that it is unnecessary to use this flag when the DISABLE_DATA_SSL_CLOSURE flag is on.

      See Also:
    • DISABLE_WAIT_ON_CLOSE

      public static final int DISABLE_WAIT_ON_CLOSE
      Stops the client waiting for an SSL closure acknowledgement on both the control channel and the data channel. This flag may be useful if it is found that the client freezes after a data-transfer or when the FTP connection is closed.

      Note that it is unnecessary to use this flag when the DISABLE_SSL_CLOSURE flag is on.

      See Also:
    • START_WITH_CLEAR_DATA_CHANNELS

      public static final int START_WITH_CLEAR_DATA_CHANNELS
      By default SSLFTPClient switches to private data channels immediately after the auth(String) method is called. It does this by invoking pbsz(0) and prot('P') from inside the auth() method. This flag stops this behaviour.
      See Also:
    • IMPLICIT_FTPS

      public static final int IMPLICIT_FTPS
      Use implicit FTPS. By default explicit FTPS is used. Implicit FTPS is an older form of FTPS which connects on a different port (usually 990) from standard FTP. It is not recommended for deployment in new systems and is included in this library mainly for compatibility with legacy systems.

      Implicit FTPS is not recommended because it is not compatible with FTP standards and not supported by as many systems. It is however, no less secure than explicit FTPS.

      See Also:
    • ALLOW_BASIC_CONSTRAINTS_IN_NON_CA

      public static final int ALLOW_BASIC_CONSTRAINTS_IN_NON_CA
      Enabling this flag relaxes the checking of basic constraints. Basic constraints are sometimes present when they are not required. By default, they are checked if they're present (even if they're not required to be there) and connections will fail if they are then found to be nonstandard. Enabling this flag will prevent failures in cases where basic constraints are not required.
      See Also:
    • DISABLE_SESSION_RESUMPTION

      public static final int DISABLE_SESSION_RESUMPTION
      Disables SSL/TLS session resumption. Session resumption is a feature of SSL/TLS, which speeds up the establishment of secure connections by caching certain cryptographic parameters during the first connection, such that they may be used in subsequent connections. This is particularly handy for FTPS which opens a new connection for each file transfer. Occasionally it can cause problems when establishing secure connections on data-channels, so this flag is provided for disabling the feature and thus forcing a full exchange of cryptographic data for every file.
      See Also:
  • Constructor Details

    • ConfigFlags

      public ConfigFlags()