LDicomNet::SetAuthDataISCL

#include "ltdic.h"

L_UINT32 LDicomNet::SetAuthDataISCL(pBuffer, nLength);

L_VOID *pBuffer;

/* pointer to the authentication data */

L_UINT32 nLength;

/* the size of the authentication data */

Sets the authentication data used during the mutual authentication process. This function is available in the PACS Imaging toolkits.

Parameter

Description

pBuffer

Pointer to an array containing the authentication data.

nLength

Length of the authentication data, in bytes.

Returns

DICOM_SUCCESS

Success

DICOM_ERROR_PARAMETER

A parameter error occurred. The authentication data could not be set. (pBuffer is NULL, or nLength is not in the range 1 128.)

Comments

Every ISCL-compliant entity must have between 1 and 128 bytes of authentication data. These authentication data are exchanged between client and server during the mutual authentication process. This function sets an array of 1 to 128 bytes that contains authentication data.

The authentication data is data exchanged in plain text. After the mutual authentication process, the communication entities can verify the authentication data of the other entity (client or server) and, if the authentication data is wrong, can close the connection.

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::SetDefaultSigningISCL, LDicomNet::SetDefaultEncryptionISCL, 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_SetAuthDataISCLExample()
{
   L_INT nRet;
   // LMyDicomNet is a class derived from LDicomNet
   LMyDicomNet *pDicomNet1, *pDicomNet2;
   pDicomNet1 = new LMyDicomNet(TEXT(""), DICOM_SECURE_ISCL);
   pDicomNet2 = new LMyDicomNet(TEXT(""), DICOM_SECURE_ISCL);
   nRet =pDicomNet1->SetAuthDataISCL(TEXT("Server LEAD ISCL"), 13);
   if(nRet !=DICOM_SUCCESS)
      return nRet;
   L_UCHAR data[5] = {0x21, 0x14, 0x00, 0x45, 0xff};
   nRet = pDicomNet2->SetAuthDataISCL(data, 5);   // authentication data can be binary data
   if(nRet != DICOM_SUCCESS)
      return nRet;
   return DICOM_SUCCESS;
}