LDicomNet::GetCiphersuiteTLS

#include "ltdic.h"

L_CIPHERSUITE LDicomNet::GetCiphersuiteTLS()

Returns the cipher suite agreed upon during the TLS protocol. This function is available in the Medical Suite 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

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

{
   // LMyDicomNet is a class derived from LDicomNet
   // pDicomNet is a pointer to a LMyDicomNet object: LMyDicomNet *pDicomNet;
   pDicomNet = new LMyDicomNet("", DICOM_SECURE_TLS);
   pDicomNet->SetCipherToIndexTLS(0, TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA);
   pDicomNet->Connect(NULL, 0, "127.0.0.1", 2762);
}
// in a OnConnect callback:
L_VOID LMyDicomNet::OnConnect()
{
   L_CIPHERSUITE test = pDicomNet->GetCiphersuiteTLS();
   if(test == TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA)
      AfxMessageBox(" Ciphersuite is TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA");
}