LDicomNet::SetDefaultSigningISCL

#include "ltdic.h"

L_UINT32 LDicomNet::SetDefaultSigningISCL(SignMode);

L_UINT32 SignMode;

/* type of message authentication code */

Sets the current message authentication code type. This function is available in the PACS Imaging toolkits.

Parameter

Description

SignMode

Flag that indicates the type of message authentication code to be used. Possible values are:

 

Value

Meaning

 

DICOM_ISCL_MAC_NONE

No message authentication code will be used.

 

DICOM_ISCL_MAC_MD5

A 128 bit MD5 message authentication code is transmitted with the message.

 

DICOM_ISCL_MAC_DESMAC

A 64 bit DESMAC authentication code is transmitted with the message.

Returns

DICOM_SUCCESS

Success

DICOM_ERROR_PARAMETER

A parameter error occurred. The message authentication code will be of type DICOM_ISCL_MAC_MD5.

Comments

The message authentication code is encrypted using the current encryption mode before being sent and decrypted after being received. The current encryption mode is set using the LDicomNet::SetDefaultEncryptionISCL function.

The encryption mode and the message authentication code type must be the same for both the sender and the receiver.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

LDicomNet::StartUp, LDicomNet::SetDefaultEncryptionISCL, LDicomNet::SetAuthDataISCL, LDicomNet::SetMaxCommBlockLengthISCL, LDicomNet::SetMaxMessageLengthISCL, LDicomNet::SetMutualAuthAlgISCL, LDicomNet::SetMutualAuthKeyISCL, LDicomNet::SetIndexForMutualAuthISCL, LDicomNet::SetEncryptKeyISCL, LDicomNet::SetIndexForEncryptISCL, Class Members

Topics:

Adding Security to a DICOM Connection

 

General Integrated Secure Communication Layer (ISCL) Information

Example

L_INT LDicomNet_SetDefaultSigningISCLExample(LMyDicomNet *m_pDicomNet)
{
   L_INT nRet;
   // LMyDicomNet is a class derived from LDicomNet
   LMyDicomNet *pDicomNet;
   pDicomNet = new LMyDicomNet(TEXT(""), DICOM_SECURE_ISCL);
   nRet = pDicomNet->StartUp();
   if (nRet == DICOM_SUCCESS)
      AfxMessageBox(TEXT("StartUp() Successfull"));
   else
   {
      AfxMessageBox(TEXT("StartUp() Failed"));
      return nRet;
   }
   //connect to a server
   nRet = m_pDicomNet->Connect(NULL, 0, TEXT("127.0.0.1"), 2761);
   if(nRet != DICOM_SUCCESS)
   {
      AfxMessageBox(TEXT("Connect() failed"));
      return nRet;
   }
   else
      AfxMessageBox(TEXT("Connect() successfull"));
   nRet = pDicomNet->SetDefaultSigningISCL(DICOM_ISCL_MAC_MD5);
   if(nRet != DICOM_SUCCESS)
      return nRet;
   return DICOM_SUCCESS;
}