Retrieving session security information

The CtsSecurity.SSLSession and CtsSecurity.SSLSessionInfo classes allow you to determine whether SSL is used on connections from a proxy to the server, and if so, retrieve the SSL session settings. The code below illustrates the sequence of calls:

  ... deleted code to set ORB ssl properties, 
     create session, instantiate proxy myComp ...
  Dim sslSess As CtsSecurity.SSLSession
  Dim sslSessInfo As CtsSecurity.SSLSessionInfo
  sslSess =   myComp.Narrow_("CtsSecurity/SSLSession")
  On Error Go To noSSLError
  Set sslSessInfo = _
    sslSess.getSessionInfo.Narrow_( _
      "CtsSecurity/SSLSessionInfo")
noSSLError:
     ... an error raised by getSessionInfo most likely 
         means that the proxy does not use SSL ...

You can narrow the proxy for any CORBA object to CtsSecurity/SSLSession to obtain information about the session in which the proxy was created. When narrowing the SSLSession proxy to CTSSecurity/SSLSessionInfo, the proxy server raises an error if the session is not using SSL.

The SSLSessionInfo methods allow you to determine the SSL session properties, such as the server’s address, the client certificate in use, the server certificate in use, and so forth. For more information, see the generated Interface Repository documentation for the CtsSecurity::SSLSessionInfo interface.