LDicomNet::OnSecureLinkReady

#include "ltdic.h"

virtual L_VOID LDicomNet::OnSecureLinkReady(nError)

L_UINT32 nError;

/* error code */

This function is called when an ISCL or TLS secured connection is successfully established. This function is available in the Medical Suite toolkits.

Parameter

Description

nError

Error code. For a list of possible values, refer to Return Codes.

Returns

None.

Comments

This function is called after the ISCL or TLS connection is successfully established. From this moment until the connection is closed, an application can securely send and receive data.

See Also

Topics:

Adding TLS Security to a DICOM Connection

 

Negotiating a Ciphersuite

 

General Transport Layer Secure (TLS) Information

Example

L_VOID myLDicomNet::OnSecureLinkReady(L_UINT32 nError)
{
   char str[128];
   if (nError == DICOM_SUCCESS)
   {
      L_CIPHERSUITE tmp;
      tmp = this->GetCiphersuiteTLS();
      if (tmp == TLS_DHE_RSA_WITH_DES_CBC_SHA)
         sprintf(str, "Secure connected, cipher is TLS_DHE_RSA_WITH_DES_CBC_SHA");
      if (tmp == TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)
         sprintf(str, "Secure connected, cipher is TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA");
      AfxMessageBox(str);
   }
   else
   {
      sprintf(str, "ClientTLS: Secure link error %d", nError);
      AfxMessageBox(str);
   }
};