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 Essential Networking Module 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 in the Internet Protocols Module User's Guide.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.