L_DicomSetClientCertificateTLS
#include "ltdic.h"
L_UINT32 L_DicomSetClientCertificateTLS(hNet, pszPathToCertificateFile, nCertType, pszPathToKeyFile)
|
HDICOMNET hNet; |
/* handle to an existing DICOM Network */ |
|
L_CHAR *pszPathToCertificateFile; |
/* path to the file that contains the certificate */ |
|
L_UINT32 nCertType; |
/* certificate type */ |
|
L_CHAR *pszPathToKeyFile; |
/* path to the file containing the private key */ |
Sets a certificate for the client. This function is available in the Medical Suite toolkits.
|
Parameter |
Description | |
|
hNet |
Handle to an existing DICOM Network. This is the handle returned from the L_DicomCreateNet function. | |
|
pszPathToCertificate |
Character string that contains the path to the file that contains the certificate. | |
|
nCertType |
Flag that indicates whether the certificate is binary or text. Possible values are: | |
|
|
Value |
Meaning |
|
|
L_TLS_FILETYPE_PEM |
Text certificate. |
|
|
L_TLS_FILETYPE_ASN1 |
Binary certificate. |
|
pszPathToKeyFile |
Character string that contains the path to the file containing the private key. This parameter is used if the private key is available in raw mode. | |
Returns
|
DICOM_SUCCESS |
Success. |
|
<>DICOM_SUCCESS |
An error occurred. Refer to the Return Codes. |
Comments
Usual size for RSA key is 512 and 1024 bits. There are no known export restrictions.
The nCertType can take values L_TLS_FILETYPE_PEM (text certificate) or L_TLS_FILETYPE_ASN1 (binary certificate).
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 |
See Also
|
Functions: |
|
|
Topics: |
|
|
|
|
|
|
|
|
|
Example
{
HDICOMNET hDicomNet;
int nRet;
nRet = L_DicomSetClientCertificate(hDicomNet, "c:\\cert\\client.pem", L_TLS_FILETYPE_PEM, NULL);
char strMsg[64];
sprintf(strMsg, "Loaded client certificate, result is %s", nRet?"Error":"Success");
MessageBox(NULL, strMsg, "", MB_OK);
}