The password to use if the ClientCertificateKey file is password-encrypted.
public string ClientCertificateKeyPassword { get; set; }
The password to use if the ClientCertificateKey file is password-encrypted.
CipherSuiteList is a member of the BaseClient abstract class.
See BaseClient for a list of SCU classes that derive from BaseClient and how the BaseClient members are used by an SCU to connect securely using TLS to a DICOM SCP.
using LeadtoolsExamples.Common;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Dicom;
using Leadtools.Dicom.Scu.Common;
using Leadtools.ImageProcessing;
using Leadtools.Dicom.AddIn.Common;
using Leadtools.Dicom.Scu;
using Leadtools.Medical.Workstation.Client;
using Leadtools.Medical.Workstation.Client.Local;
using Leadtools.Medical.Workstation.Client.Pacs;
// public void QueryPACSSecure()
{
// Leadtools.Examples.Support.SetLicense();
AeInfo clientInfo = new AeInfo();
DicomScp scpInfo = new DicomScp();
clientInfo.Address = Dns.GetHostName(); //local machine
clientInfo.AETitle = "L20_CLIENT64";
clientInfo.Port = 1030;
scpInfo.AETitle = "L20_PACS_SCP64";
scpInfo.PeerAddress = IPAddress.Parse("192.168.5.101");
scpInfo.Port = 534;
scpInfo.Timeout = 30;
scpInfo.Secure = true;
PacsQueryClient client = new PacsQueryClient(clientInfo, scpInfo);
client.EnableLog = true;
client.LogFileName = Path.Combine(LEAD_VARS.ImagesDir, "DicomLog.txt");
// Set client security settings
DicomOpenSslContextCreationSettings settings = new DicomOpenSslContextCreationSettings(
DicomSslMethodType.SslV23,
Path.Combine(LEAD_VARS.CertificatesDir, "ca.pem"),
DicomOpenSslVerificationFlags.None,
9,
DicomOpenSslOptionsFlags.AllBugWorkarounds
);
client.OpenSslContextCreationSettings = settings;
client.ClientCertificate = Path.Combine(LEAD_VARS.CertificatesDir, "client.pem");
client.ClientCertificateKey = Path.Combine(LEAD_VARS.CertificatesDir, "client.pem");
client.ClientCertificateKeyPassword = "test";
client.ClientCertificateType = DicomTlsCertificateType.Pem;
client.CipherSuiteList.Add(DicomTlsCipherSuiteType.EcdheRsaWithAes128GcmSha256);
PerformClientQuery(client);
}
public void PerformClientQuery(QueryClient client)
{
FindQuery studiesQuery = new FindQuery();
DicomDataSet[] studies = client.FindStudies(studiesQuery);
if (studies.Length > 0)
{
DicomDataSet study = studies[0];
FindQuery seriesQuery = new FindQuery();
seriesQuery.StudyInstanceUID = study.GetValue<string>(DicomTag.StudyInstanceUID, string.Empty);
DicomDataSet[] series = client.FindSeries(seriesQuery);
foreach (DicomDataSet seriesDS in series)
{
FindQuery imagesQuery = new FindQuery();
imagesQuery.SeriesInstanceUID = seriesDS.GetValue<string>(DicomTag.SeriesInstanceUID, string.Empty);
DicomDataSet[] images = client.FindImages(imagesQuery);
foreach (DicomDataSet instance in images)
{
Console.WriteLine("SOPInstanceUID: {0}", instance.GetValue<string>(DicomTag.SOPInstanceUID, string.Empty));
Console.WriteLine("SeriesInstanceUID: {0}", instance.GetValue<string>(DicomTag.SeriesInstanceUID, string.Empty));
Console.WriteLine("StudyInstanceUID: {0}", instance.GetValue<string>(DicomTag.StudyInstanceUID, string.Empty));
}
}
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}