#include "ltdic.h"
L_INT EXT_CALLBACK YourFunction (hNet, pszPassword, nSize, nFlag, pUserData)
HDICOMNET hNet; |
a DICOM Network handle |
L_TCHAR * pszPassword; |
character string containing password that must be filled |
L_INT nSize; |
size of the buffer pointed to by pszPassword |
L_INT nFlag; |
flag specifying whether pszPassword is used for decryption or encryption |
L_VOID * pUserData; |
pointer to additional data |
The L_DicomSetClientCertificateTLS or L_DicomSetServerCertificateTLS functions generate a call to this function whenever the private key file is password encrypted in order to obtain the password to decrypt the file. When using this event function, copy the private key into the pszPassword buffer, and have the function return the length of the password. This function is available in the Medical SuiteToolkit.
Parameter | Description | |
hNet | A DICOM Network handle. | |
pszPassword | (in,out) pointer to a character string buffer to be used to hold the password. Copy the password for the private key file into this buffer. | |
nSize | (in) size of the buffer pointed to by pszPassword. This is an incoming parameter. | |
nFlag | (in) flag specifying whether pszPassword is being used for decryption or encryption. Possible values are: | |
Value | Meaning | |
0 | The pszPassword is being used for decryption. | |
1 | The pszPassword is being used for encryption. | |
pUserData | Void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. | |
Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function. |
Have the function return the length of the password copied into the pszPassword buffer.
A call to this function may be generated after a call to L_DicomSetClientCertificateTLS or L_DicomSetClientCertificateTLS. Calling either of these functions with a private key file that is password encrypted will result in a call to this function in order to obtain the password. To process this function, perform the following steps:
1. |
Copy the password used to encrypt the private key into the pszPassword buffer. |
2. |
Return the length of the password copied into pszPassword. |
The nSize and nFlag arguments are provided for information, and should not be changed. The length of the pszPassword buffer is given in the nSize parameter. The input parameter nFlag indicates whether the password will be used for encryption or decryption.
To use this callback function, PRIVATEKEYPASSWORD must be set using L_DicomSetCallbackExt.
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 |
Win32, x64
For an example, refer to L_DicomCreateNetExt.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET