Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C++ Class Library Help

LDicomNet::GetCiphersuiteTLS

Show in webframe

#include "ltdic.h"

L_CIPHERSUITE LDicomNet::GetCiphersuiteTLS()

Returns the cipher suite agreed upon during the TLS protocol. This function is available in the PACS Imaging toolkits.

Returns

<>0

A value that indicates the ciphersuite agreed upon during the TLS protocol.

0

No cipher suite has been agreed upon yet.

Comments

The ciphersuite is chosen by the server as the first client proposed ciphersuite that the server can understand.

Required DLLs and Libraries

LTDIC
LTCRY
LTTLS

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::GetCipherFromIndexTLS, Class Members

Topics:

Adding TLS Security to a DICOM Connection

 

Negotiating a Ciphersuite

 

General Transport Layer Secure (TLS) Information

Example

L_INT LDicomNet__GetCiphersuiteTLSExample()
{
   L_INT nRet;
   // LMyDicomNet is a class derived from LDicomNet
   // pDicomNet is a pointer to a LMyDicomNet object: LMyDicomNet *pDicomNet;
   LMyDicomNet* pDicomNet = new LMyDicomNet(TEXT(""), DICOM_SECURE_TLS);
   nRet =pDicomNet->SetCipherToIndexTLS(0, TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA);
   if(nRet !=DICOM_SUCCESS)
      return nRet;
   nRet =pDicomNet->Connect(NULL, 0, TEXT("127.0.0.1"), 2762);
   if(nRet !=DICOM_SUCCESS)
      return nRet;
   return DICOM_SUCCESS;
   }
// in a OnConnect callback:
L_VOID LMyDicomNetExt::OnConnect(LMyDicomNet* pDicomNet)
{
   L_CIPHERSUITE test = pDicomNet->GetCiphersuiteTLS();
   if(test == TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)
      AfxMessageBox(TEXT(" Ciphersuite is TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA"));
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.