Using FTPS
Developing an FTPS Application
The steps discussed here describe how to write an FTPS application. They are similar to writing an FTP application with the addition of a secure connection.
NOTE: This chapter describes the use of FTP over a secure channel. It assumes that you understand the FTP package (Rogue Wave Internet Protocols Module) and the Secure Sockets package.
1. Set up for a secure connection. These steps are identical to writing any application that uses secure sockets.
*Initialize the Winsock library, if you are using Windows, by calling the RWWinSockInfo constructor (see the ../sourceproref:index.htmlSourcePro Reference Guide).
*Initialize the Secure Sockets package and seed the random number generator, if necessary. See Initializing the Secure Sockets Package.
2. Construct a client RWFtpsClient, passing it the context and then using RWFtpsReply to connect to an FTP server. (The next three steps are illustrated in Using the FTPS Package.)
3. Establish a secure connection with the server using the AUTH command on the client. Once established, use the standard USER/PASS login sequence.
4. (Optional) Enable data encryption if you are transferring confidential data, using first the PBSZ protocol command followed by the PROT command. By default, the data channel is unencrypted.
5. Perform whatever protocol action you want, the same as when using an unsecured FTP application. See Chapter 4, “The FTP Package,” in the Internet Protocols Module User's Guide.