Developing HTTPS Applications
The following steps describe how to write an HTTPS application. They are similar to writing an HTTP application, and step 1 through step 3 are identical to writing an application that uses secure sockets.
1. Initialize the Winsock library, if you are using Windows, by calling the
RWWinSockInfo constructor (see the
../sourceproref:index.htmlSourcePro Reference Guide).
4. Decide whether to use the agent class or the client class.
For simple requests, use the agent class.
For more control over the HTTP protocol, use the client class.
5. Associate the secure socket context created in step 3 with your chosen HTTPS class.
For the agent class, call
RWHttpsSecurityManager::setAgentContext(context).
For the client class, create an instance of
RWHttpsSecureSocketClient by calling the static
make() function and pass the context to it.
6. Write a certificate name mismatch callback (see
Supplying Your Own Callbacks ). It is not strictly required, but the default behavior (throwing an exception) may not be acceptable for your application.
7. Continue developing your HTTPS application just as you would an HTTP application. See Chapter 5, “The HTTP Package,” in the Internet Protocols Module User’s Guide.