Available in LEADTOOLS Medical Imaging toolkits. |
LDicomNet::SetClientCertificateTLS
#include "ltdic.h"
L_UINT32 LDicomNet::SetClientCertificateTLS(pszPathToCertificate, certType, pszPathToKeyFile);
L_TCHAR *pszPathToCertificate; |
/* character string */ |
L_UINT32 certType; |
/* certificate type */ |
L_TCHAR *pszPathToKeyFile; |
/* character string */ |
Sets a certificate for the client. This function is available in the Medical Imaging Suite toolkits.
Parameter |
Description |
|
pszPathToCertificate |
Character string that contains the path to the file that contains the certificate. |
|
certType |
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 Return Codes. |
Comments
The usual sizes for an RSA key is 512 and 1024 bits. There is a limitation for import in Europe a RSA key must be at least 768 bits long. There are no known export restrictions.
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
See Also
Functions: |
|
Topics: |
|
|
|
|
Example
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName L_INT LDicomNet_SetClientCertificateTLSExample(LDicomNet* m_pDicomNet) { L_INT nRet; LDicomNet* pDicomNet; pDicomNet = m_pDicomNet; nRet =pDicomNet->SetClientCertificateTLS(MAKE_IMAGE_PATH(TEXT("client.pem")), L_TLS_FILETYPE_PEM, NULL); if(nRet !=DICOM_SUCCESS) return nRet; L_TCHAR strMsg[64]; wsprintf(strMsg, TEXT("Loaded client certificate, result is %s"), nRet?TEXT("Error"):TEXT("Success")); AfxMessageBox(strMsg); return DICOM_SUCCESS; }