SourcePro
:
Secure Communication Module User’s Guide
:
PART II Secure Sockets Package
:
Using Secure Sockets
:
Developing Secure Applications
: Writing New Secure Sockets Applications
Writing New Secure Sockets Applications
In general, to write new secure applications, you must:
1.
Obtain certificates and keys for your application. See
Obtaining Certificates.
2.
Initialize the Winsock library, if you are using Windows, by calling the
RWWinSockInfo
constructor (see the
SourcePro API Reference Guide
).
3.
Initialize the Secure Sockets package and seed the random number generator (if necessary). See
Initializing the Secure Sockets Package.
4.
Create an instance of class
RWSecureSocketContext
. See
Creating the Secure Socket Context.
Initialize the context using the
setIdentity()
function for a server, or the
prepareToAuthenticate()
function for a client.
To use both client and server authentication, call both functions. See
Initializing the Context to Perform Both Client and Server Authentication.
5.
Construct a certificate, if you are writing a server application. See
Constructing a Certificate
and
Checking the Validity of a Certificate.
6.
Create an
RWInetAddr
to bind or connect to.
7.
Construct an
RWSecureSocket
,
RWSecureSocketPortal
, or
RWSecureSocketListener
using the context and address created in step 6. See
Using RWSecureSocket, RWSecureSocketPortal, and RWSecureSocketListener.
8.
Write an application that sends and receives secure messages.
This site works best with JavaScript enabled