LDicomNet::OnSecureLinkReady
#include "ltdic.h"
virtual L_VOID LDicomNet::OnSecureLinkReady(nError)
L_UINT32 nError; |
/* error code */ |
This function is called when an ISCL or TLS secured connection is successfully established. This function is available in the Medical Suite toolkits.
Parameter |
Description |
nError |
Error code. For a list of possible values, refer to Return Codes. |
Returns
None.
Comments
This function is called after the ISCL or TLS connection is successfully established. From this moment until the connection is closed, an application can securely send and receive data.
See Also
Topics: |
|
|
|
|
Example
/*<struct>*/ #ifdef LMYDICOMNETEXT { class LMyDicomNetExt : public LDicomNet { public: L_INT m_nProcess; L_INT m_nClientOrServer; L_INT m_nDataCommand; L_INT m_FileCount; LMyDicomNetExt (L_TCHAR *pszPath, L_INT32 nMode); LMyDicomNetExt (L_TCHAR *pszPath, L_INT32 nMode, L_BOOL bReserved); virtual ~LMyDicomNetExt (); L_VOID LMyDicomNetExt::OnReceive (L_INT nError, L_UCHAR nType, L_UCHAR *pBuffer, L_UINT32 nBytes);//GetErrorSecure L_VOID LMyDicomNetExt::OnSecureLinkReady(L_UINT32 nError);//GetPeerAuthDataISCL L_VOID LMyDicomNetExt::OnConnect();//GetCiphersuiteTLS L_VOID LMyDicomNetExt::OnConnect(LMyDicomNet* pDicomNet); L_VOID LMyDicomNetExt::OnReceiveAssociateRequest(LDicomAssociate *pPDU); L_UINT32 LMyDicomNetExt::GetChallengeISCL(L_UINT64 *pChallenge, L_UINT64 nParameter); L_UINT32 LMyDicomNetExt::InternalAuthenticateISCL(L_UINT64 nChallenge, L_UINT64 *pResponse, L_UINT64 nParameter); L_UINT32 LMyDicomNetExt::ExternalAuthenticateISCL(L_UINT64 nChallenge, L_UINT64 nResponse, L_UINT64 nParameter); }; #endif // #ifdef LMyDicomNetExt /*</struct>*/ L_VOID LMyDicomNetExt::OnSecureLinkReady(L_UINT32 nError) { L_TCHAR str[128]; if (nError == DICOM_SUCCESS) { L_CIPHERSUITE tmp; tmp = this->GetCiphersuiteTLS(); if (tmp == TLS_DHE_RSA_WITH_DES_CBC_SHA) wsprintf(str, TEXT("Secure connected, cipher is TLS_DHE_RSA_WITH_DES_CBC_SHA")); if (tmp == TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) wsprintf(str, TEXT("Secure connected, cipher is TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA")); AfxMessageBox(str); } else { wsprintf(str, TEXT("ClientTLS: Secure link error %d"), nError); AfxMessageBox(str); } };