LAUREL BRIDGE

TlsConnectionConnectAsClient Method

DICOM Connectivity Framework V3.4
Initiates authentication of the TLS connection as a client.

Namespace:  LaurelBridge.DCFExamples.TLS
Assemblies:   EchoSCU (in EchoSCU.exe) Version: DCF34 r13043 DCF_3_4_56_20220408 NetFramework
  VerificationSCPExtended (in VerificationSCPExtended.exe) Version: DCF34 r13043 DCF_3_4_56_20220408 NetFramework
Syntax

C#
public void ConnectAsClient(
	string targetHostname,
	bool sendClientCertificate = false,
	X509Certificate2 certificate = null,
	RemoteCertificateValidationCallback certificateValidator = null
)

Parameters

targetHostname
Type: SystemString
The target hostname
sendClientCertificate (Optional)
Type: SystemBoolean
Send client certification for verification
certificate (Optional)
Type: System.Security.Cryptography.X509CertificatesX509Certificate2
The client certificate
certificateValidator (Optional)
Type: System.Net.SecurityRemoteCertificateValidationCallback
The remote certificate validation callback
Exceptions

ExceptionCondition
AuthenticationExceptionAuthentication exception thrown for null certificates
ExceptionPropagate exceptions thrown from TlsStream
See Also

Reference