←Select platform

IDicomSecurityCiphers Interface

Summary

Allows implementors to specify a list of supported DICOM TLS Cipher Suites in an add-in.

Syntax
C#
public interface IDicomSecurityCiphers 

Remarks

A DICOM add-in implements this interface to specify a list of DicomTlsCipherSuiteType values that are to be supported when using secured DICOM TLS communication.

In the PACS Framework, the Leadtools.Medical.Security.AddIn.dll implements this interface. For detailed example usage, see the source code for the Leadtools.Medical.Security.AddIn.dll.

Example

This example shows a basic PACS Framework add-in that implements the IDicomSecurity and IDicomSecurityCiphers interfaces.

C#
VB
using Leadtools.Dicom.AddIn.Attributes; 
using Leadtools.Dicom.AddIn.Interfaces; 
using Leadtools.Dicom; 
using Leadtools.Dicom.AddIn; 
 
public class DicomSecurityAddin : IDicomSecurity, IDicomSecurityCiphers 
{ 
   public DicomSecurityAddin() 
   { 
      CertificationAuthoritiesFileName = "ca.pem"; 
      MaximumVerificationDepth = 9; 
      Options = DicomOpenSslOptionsFlags.AllBugWorkarounds | DicomOpenSslOptionsFlags.NoSslV2 | DicomOpenSslOptionsFlags.NoSslV3; 
      VerificationFlags= DicomOpenSslVerificationFlags.None; 
      CertificateFileName = "server.pem"; 
      CertificateType = DicomTlsCertificateType.Pem; 
      KeyFileName = "server.pem"; 
      Password = "test"; 
      SslMethodType = DicomSslMethodType.SslV23; 
 
      List <DicomTlsCipherSuiteType> cipherSuiteList = new List<DicomTlsCipherSuiteType>(); 
 
      // Add support for the TLS Version 1.2 ciphers specified in PS3.15 of the DICOM Specification 
      cipherSuiteList.Add(DicomTlsCipherSuiteType.EcdheRsaWithAes128GcmSha256); 
      cipherSuiteList.Add(DicomTlsCipherSuiteType.EcdheRsaWithAes256GcmSha384); 
      cipherSuiteList.Add(DicomTlsCipherSuiteType.DheRsaWithAes128GcmSha256); 
      cipherSuiteList.Add(DicomTlsCipherSuiteType.DheRsaWithAes256GcmSha384); 
      CipherSuiteList = cipherSuiteList; 
   } 
 
   public string CertificationAuthoritiesFileName 
   { 
      get; 
      set; 
   } 
 
   public int MaximumVerificationDepth 
   { 
      get; 
      set; 
   } 
 
   public DicomOpenSslOptionsFlags Options 
   { 
      get; 
      set; 
   } 
 
   public DicomOpenSslVerificationFlags VerificationFlags 
   { 
      get; 
      set; 
   } 
 
   public string CertificateFileName 
   { 
      get; 
      set; 
   } 
 
   public DicomTlsCertificateType CertificateType 
   { 
      get; 
      set; 
   } 
 
   public string KeyFileName 
   { 
      get; 
      set; 
   } 
 
   public string Password 
   { 
      get; 
      set; 
   } 
 
   public DicomSslMethodType SslMethodType 
   { 
      get; 
      set; 
   } 
 
   public List<DicomTlsCipherSuiteType> CipherSuiteList 
   { 
      get; 
      set; 
   } 
} 
Imports Leadtools.Dicom.AddIn.Attributes 
Imports Leadtools.Dicom.AddIn.Interfaces 
Imports Leadtools.Dicom 
Imports Leadtools.Dicom.AddIn 
 
Public Class DicomSecurityAddin 
    Implements IDicomSecurity, IDicomSecurityCiphers 
    Public Sub New() 
        CertificationAuthoritiesFileName = "ca.pem" 
        MaximumVerificationDepth = 9 
        Options = DicomOpenSslOptionsFlags.AllBugWorkarounds Or DicomOpenSslOptionsFlags.NoSslV2 Or DicomOpenSslOptionsFlags.NoSslV3 
        VerificationFlags = DicomOpenSslVerificationFlags.None 
        CertificateFileName = "server.pem" 
        CertificateType = DicomTlsCertificateType.Pem 
        KeyFileName = "server.pem" 
        Password = "test" 
        SslMethodType = DicomSslMethodType.SslV23 
 
        Dim cipherSuiteList As New List(Of DicomTlsCipherSuiteType)() 
 
        ' Add support for the TLS Version 1.2 ciphers specified in PS3.15 of the DICOM Specification 
        cipherSuiteList.Add(DicomTlsCipherSuiteType.EcdheRsaWithAes128GcmSha256) 
        cipherSuiteList.Add(DicomTlsCipherSuiteType.EcdheRsaWithAes256GcmSha384) 
        cipherSuiteList.Add(DicomTlsCipherSuiteType.DheRsaWithAes128GcmSha256) 
        cipherSuiteList.Add(DicomTlsCipherSuiteType.DheRsaWithAes256GcmSha384) 
        cipherSuiteList = cipherSuiteList 
    End Sub 
 
    Private privateCertificationAuthoritiesFileName As String 
    Public Property CertificationAuthoritiesFileName() As String Implements IDicomSecurity.CertificationAuthoritiesFileName 
        Get 
            Return privateCertificationAuthoritiesFileName 
        End Get 
        Set(ByVal value As String) 
            privateCertificationAuthoritiesFileName = value 
        End Set 
    End Property 
 
    Private privateMaximumVerificationDepth As Integer 
    Public Property MaximumVerificationDepth() As Integer Implements IDicomSecurity.MaximumVerificationDepth 
        Get 
            Return privateMaximumVerificationDepth 
        End Get 
        Set(ByVal value As Integer) 
            privateMaximumVerificationDepth = value 
        End Set 
    End Property 
 
    Private privateOptions As DicomOpenSslOptionsFlags 
    Public Property Options() As DicomOpenSslOptionsFlags Implements IDicomSecurity.Options 
        Get 
            Return privateOptions 
        End Get 
        Set(ByVal value As DicomOpenSslOptionsFlags) 
            privateOptions = value 
        End Set 
    End Property 
 
    Private privateVerificationFlags As DicomOpenSslVerificationFlags 
    Public Property VerificationFlags() As DicomOpenSslVerificationFlags Implements IDicomSecurity.VerificationFlags 
        Get 
            Return privateVerificationFlags 
        End Get 
        Set(ByVal value As DicomOpenSslVerificationFlags) 
            privateVerificationFlags = value 
        End Set 
    End Property 
 
    Private privateCertificateFileName As String 
    Public Property CertificateFileName() As String Implements IDicomSecurity.CertificateFileName 
        Get 
            Return privateCertificateFileName 
        End Get 
        Set(ByVal value As String) 
            privateCertificateFileName = value 
        End Set 
    End Property 
 
    Private privateCertificateType As DicomTlsCertificateType 
    Public Property CertificateType() As DicomTlsCertificateType Implements IDicomSecurity.CertificateType 
        Get 
            Return privateCertificateType 
        End Get 
        Set(ByVal value As DicomTlsCertificateType) 
            privateCertificateType = value 
        End Set 
    End Property 
 
    Private privateKeyFileName As String 
    Public Property KeyFileName() As String Implements IDicomSecurity.KeyFileName 
        Get 
            Return privateKeyFileName 
        End Get 
        Set(ByVal value As String) 
            privateKeyFileName = value 
        End Set 
    End Property 
 
    Private privatePassword As String 
    Public Property Password() As String Implements IDicomSecurity.Password 
        Get 
            Return privatePassword 
        End Get 
        Set(ByVal value As String) 
            privatePassword = value 
        End Set 
    End Property 
 
    Private privateSslMethodType As DicomSslMethodType 
    Public Property SslMethodType() As DicomSslMethodType Implements IDicomSecurity.SslMethodType 
        Get 
            Return privateSslMethodType 
        End Get 
        Set(ByVal value As DicomSslMethodType) 
            privateSslMethodType = value 
        End Set 
    End Property 
 
    Private privateCipherSuiteList As List(Of DicomTlsCipherSuiteType) 
    Public Property CipherSuiteList() As List(Of DicomTlsCipherSuiteType) Implements IDicomSecurityCiphers.CipherSuiteList 
        Get 
            Return privateCipherSuiteList 
        End Get 
        Set(ByVal value As List(Of DicomTlsCipherSuiteType)) 
            privateCipherSuiteList = value 
        End Set 
    End Property 
End Class 

Requirements

Target Platforms

See Also

Reference

IDicomSecurityCiphers Class

IDicomSecurityCiphers Members

Leadtools.Dicom.AddIn.Interfaces Namespace

Help Version 20.0.2020.5.27
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom.AddIn Assembly