Loading...
Searching...
No Matches
DcmTLSOptions Class Reference

A class that handles the command line arguments used by applications that support TLS. More...

Inheritance diagram for DcmTLSOptions:

## Public Member Functions

| DcmTLSOptions (T_ASC_NetworkRole networkRole)
| Constructor.
virtual | ~DcmTLSOptions ()
| Destructor.
virtual void | addTLSCommandlineOptions (OFCommandLine &cmd)
| Add TLS specific command line options to the OFCommandLine object passed to the constructor.
virtual void | parseArguments (OFConsoleApplication &app, OFCommandLine &cmd)
| Parse and evaluate the given command line arguments.
virtual OFCondition | createTransportLayer (T_ASC_Network *net, T_ASC_Parameters *params, OFConsoleApplication &app, OFCommandLine &cmd)
| Create a DcmTLSTransportLayer object based on the collected command line arguments.
Public Member Functions inherited from DcmTLSOptionsBase
| DcmTLSOptionsBase (T_ASC_NetworkRole networkRole)
| Constructor.
virtual | ~DcmTLSOptionsBase ()
| Destructor.
virtual OFCondition | writeRandomSeed ()
| Update the random seed file if this was requested by the given command line arguments.
virtual OFBool | secureConnectionRequested () const
| Returns true if a secure connection was requested, false otherwise.
virtual DcmTransportLayer * | getTransportLayer ()
| Returns a pointer to the transport layer object, or NULL if the object has not yet been created by a call to createTransportLayer().
virtual OFCondition | verifyClientCertificate (const char *fileName)
| loads a certificate or certificate chain from a file and checks whether it can be verified against the current settings of the trust store.
virtual OFCondition | isRootCertificate (const char *fileName)
| loads a certificate file and checks whether it is a valid (e.g.

## Additional Inherited Members

Static Public Member Functions inherited from DcmTLSOptionsBase
static OFBool | listOfCiphersRequested (OFCommandLine &cmd)
| checks if the command line option –list-ciphers was given.
static OFBool | listOfProfilesRequested (OFCommandLine &cmd)
| checks if the command line option –list-profiles was given.
static void | printSupportedCiphersuites (OFConsoleApplication &app, STD_NAMESPACE ostream &os)
| print a list of supported ciphersuites to the given output stream
static void | printSupportedTLSProfiles (OFConsoleApplication &app, STD_NAMESPACE ostream &os)
| print a list of supported TLS profiles to the given output stream
static void | printLibraryVersion ()
| Print OpenSSL library version string.
Protected Attributes inherited from DcmTLSOptionsBase
DcmKeyFileFormat | opt_keyFileFormat
| flag indicating the file format of certificates and private keys: PEM or ASN.1
OFBool | opt_doAuthenticate
| flag indicating whether we will authenticate ourselves using a certificate and private key
const char * | opt_privateKeyFile
| filename of private key file we use to authenticate ourselves
const char * | opt_certificateFile
| filename of certificate file we use to authenticate ourselves
const char * | opt_passwd
| password for reading the private key file, may be NULL.
DcmTLSSecurityProfile | opt_tlsProfile
| DICOM TLS Security Profile selected.
const char * | opt_readSeedFile
| filename of file containing at least 1K of entropy used to seed the PRNG
const char * | opt_writeSeedFile
| filename to which the modified PRNG state is written back
DcmCertificateVerification | opt_certVerification
| indicates whether we should verify the remote peer's certificate
const char * | opt_dhparam
| filename of Diffie-Hellman parameters file, may be NULL
OFBool | opt_secureConnection
| a flag indicating whether or not a secure connection was requested
T_ASC_NetworkRole | opt_networkRole
| indicates whether we act as client, server or both
const char * | opt_clientSNI
| SNI server name to be requested in outgoing connections.
const char * | opt_serverSNI
| SNI server name to be expected in incoming connections.
DcmTLSCRLVerification | opt_crlMode
| CRL verification mode.
DcmTLSTransportLayer * | tLayer
| pointer to the secure transport layer managed by this object

## Detailed Description

A class that handles the command line arguments used by applications that support TLS.

DcmTLSOptions handles storing the relevant options, printing the associated help text an information (e.g. OpenSSL library version), parsing and evaluating the given command line arguments and creating a DcmTLSTransportLayer object based on the collected information.

## Constructor & Destructor Documentation

## DcmTLSOptions()

DcmTLSOptions::DcmTLSOptions | ( | T_ASC_NetworkRole | networkRole | ) |

Constructor.

Parameters

  networkRole | the network role to create a transport layer for

## Member Function Documentation

## addTLSCommandlineOptions()

virtual void DcmTLSOptions::addTLSCommandlineOptions | ( | OFCommandLine & | cmd | ) |

virtual

Add TLS specific command line options to the OFCommandLine object passed to the constructor.

Parameters

  cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application.

## createTransportLayer()

virtual OFCondition DcmTLSOptions::createTransportLayer | ( | T_ASC_Network * | net,
|  | T_ASC_Parameters * | params,
|  | OFConsoleApplication & | app,
|  | OFCommandLine & | cmd )

virtual

Create a DcmTLSTransportLayer object based on the collected command line arguments.

Parameters

  net | pointer to network object in which the transport layer should be registered. May be NULL, in which case the caller must activate the transport layer manually using ASC_setTransportLayer().
  params | pointer to the association negotiation parameters object. For an association acceptor, this parameter is passed as NULL. If NULL is passed and the caller in an association requestor, then it is the responsibility of the caller to call ASC_setTransportLayerType() and set the right transport layer type for the association parameters.
  app | a reference to an OFConsoleApplication object used in the calling application.
  cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application.

Returns
  EC_Normal if successful, an error code otherwise

## parseArguments()

virtual void DcmTLSOptions::parseArguments | ( | OFConsoleApplication & | app,
|  | OFCommandLine & | cmd )

virtual

Parse and evaluate the given command line arguments.

Parameters

  app | a reference to an OFConsoleApplication object used in the calling application.
  cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application.

The documentation for this class was generated from the following file:

- dcmtls/include/dcmtk/dcmtls/tlsopt.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0