Establishing a direct security session

A security session is a client/server connection where the client and the server have agreed to use an external security mechanism (such as DCE) and a set of security services (such as data encryption).

In a gateway application, a direct security session is established between a gateway’s client and a remote server. The gateway acts as an intermediary while the session is established, but afterwards, the gateway is not part of the security session. Direct security sessions are useful in the following circumstances:

A security session callback allows the gateway to set up a direct security session. When the connection to the remote server is made, the callback routine acts as an intermediary for the handshaking required between the remote server and the gateway’s client. The handshaking process is outlined below:

  1. When the gateway calls ct_connect, the remote server issues one or more security session messages.

  2. For each security session message sent by the remote server, Client-Library invokes the callback, passing the security session information sent by the remote server as the callback’s input parameters.

  3. The callback forwards the information to the gateway’s client by calling the Server-Library routine srv_negotiate(CS_SET, SRV_NEG_SECSESSION).

  4. The callback then reads the client’s response and returns it to Client-Library using the callback’s output parameters.

  5. Client-Library forwards the response to the remote server.

If the remote server sends another security session message, the process is repeated.