LAUREL BRIDGE

Program Class

DICOM Connectivity Framework V3.4
A simple echo client example that shows how to do a DICOM ping. This program should be run with a Verification SCP running on localhost listening on port 10104 by default. This class also supports TLS for processing encrypted messages which should be run with VerificationSCPExtended with corresponding TLS levels enabled. View the --help command line option to see a summary of the TLS command line options.
Inheritance Hierarchy

SystemObject
  LaurelBridge.DCFExamples.EchoSCUProgram

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

C#
public class Program

The Program type exposes the following members.

Constructors

  NameDescription
Public methodProgram
Initializes a new instance of the Program class
Top
Methods

  NameDescription
Public methodStatic memberMain
Main entry point for EchoSCU.
Top
Remarks

This example creates a class that extends the VerificationSCU class and overrides the CreateDicomSocket method in order to create either an unencrypted or TLS encrypted DICOM socket.

The following command line options are specifically for enabling and configuring TLS message processing:

--tlsEnable any TLS protocol.
--tls10Enable TLS 1.0 protocol.
--tls11Enable TLS 1.1 protocol.
--tls12Enable TLS 1.2 protocol.
--tlsIgnoreMismatch(Default: false) Ignore certificate mismatch errors.
--tlsRejectSelfSigned(Default: false) Reject self-signed client certificates.
--tlsSendClientCertificate(Default: false) Send client certificate to the server.
--tlsCertificate path(Default: TlsServerCertificate.pfx) TLS certificate.
--tlsCertPassword password(Default: DcfTls1234) TLS certificate password.

If --tls or any combination of --tls10, --tls11, or --tls12 appear on the command line, a TLS encrypted server is started with all requested TLS protocols enabled, otherwise create an unencrypted server. VerificationSCPExtended accepts the highest level protocol from the SCU that matches any of the enabled protocols.

All bool command line options default to false. The option is enabled if it appears on the command line. Therefore, the default behavior is:

--tlsIgnoreMismatch, by default, fail association on certificate name mismatch errors. If this command line option is used, ignore certificate name mismatch errors.

--tlsRejectSelfSigned, by default, allow self-signed client certificates. If this command line option is used, reject associations if the client certificate is self signed.

--tlsSendClientCertificate, by default, a client certificate is not sent to the server. If this command line options is used, the client certificate and password are sent to the server.

Note, command line arguments can be specified in a console window, or with the launchSettings.json file, for example:

--tls --tlsSendClientCertificate
to enable TLS and send the client certificate and password.

See Also

Reference