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.
Initialize the Winsock library, if you are using Windows, by calling the RWWinSockInfo constructor (see the SourcePro C++ API Reference Guide).
Initialize the Secure Sockets package and seed the random number generator, if necessary. See Section 4.4, "Initializing the Secure Sockets Package."
Create an instance of class RWSecureSocketContext. See Section 4.5, "Creating the Secure Socket Context." Initialize the context using the setIdentity() function for a server, or the prepareToAuthenticate() function for a client.
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.
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.
Write a certificate name mismatch callback (see Section 8.1). It is not strictly required, but the default behavior (throwing an exception) may not be acceptable for your application.
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.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.