The Options property enables you to set the
default options for subsequent connections using the Connect
method, and some options may only be available for certain types of
connections. For example, the fileOptionSecureExplicit
option is only valid for secure FTP connections.
The fileOptionTLSReuse option allows a client and server to
reuse security information from an existing TLS connection when
establishing another secure connection. This can reduce the time and
processing required to establish the new connection. For secure FTP
(FTPS), session reuse is particularly important because the protocol
uses separate connections for commands and file transfers. Some FTP
servers require the data connection to reuse the security context
established by the control connection as an additional security
measure.
The mechanism used for TLS session resumption depends on the
protocol version. TLS 1.2 and earlier versions use traditional session
identifiers or session tickets, while TLS 1.3 uses a different
mechanism based on pre-shared keys and session tickets. When TLS
session reuse is enabled, the library uses the same security context
for both the FTP control and data connections, regardless of the
negotiated TLS version. The actual resumption behavior depends on the
TLS implementation and server support.