tfFtpSslEnable
Table of Contents >> Application Reference >> FTP Client API
| #include <trsocket.h> |
| int tfFtpSslEnable | ( |
| ttUserFtpHandle ftpUserHandle, | |
| char * certIdentity, | |
| int sslVersion, | |
| char * serverName, | |
| int secureDataConn | |
| ); |
Function Description
This function enables SSL/TLS for the current FTP session. tfFtpSslEnable() must be called after tfFtpConnect() has been called and completed successfully. It may be called before or after tfFtpLogin().
Parameters
- ftpUserHandle
- The FTP session handle.
- certIdentity
- The SSL client's own certificate name.
- sslVersion
- The SSL version number that the user wants to support for this session. Valid values can be:
- TM_SSL_VERSION_30
- TM_SSL_VERSION_31
- TM_SSL_VERSION_30 | TM_SSL_VERSION_31.
- serverName
- The name of the FTP server (e.g. "www.treck.com"). This field may be NULL.
- secureDataConn
- A boolean value indicating whether future data connections should be secure (i.e. a PROT command is issued after authentication).
Returns
- TM_ENOERROR
- Success.
- TM_WOULDBLOCK
- This FTP session is non-blocking and the call did not complete.
- TM_ENOTCONN
- The user is not currently connected to an FTP server.
- TM_EINVAL
- Invalid FTP session pointer.
- TM_EPERM
- SSL is not initialized. tfUseSsl() must be called first.
- TM_ENOBUFS
- Not enough memory to complete the requested operation.
- TM_ENOPROTOOPT
- SSL/TLS is not supported by the FTP server.
Table of Contents >> Application Reference >> FTP Client API