DCMTK  Version 3.6.3
OFFIS DICOM Toolkit
Public Member Functions | Static Public Member Functions | List of all members
DcmTLSOptions Class Reference

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

Public Member Functions

 DcmTLSOptions (class OFConsoleApplication &app, class OFCommandLine &cmd)
 Constructor. More...
 
OFCondition parseArguments ()
 Parse and evaluate the given command line arguments. More...
 
OFrvalue< OFvariant< OFCondition, DcmTLSTransportLayer > > createTransportLayer (int networkRole)
 Create a DcmTLSTransportLayer object based on the collected command line arguments. More...
 
OFCondition writeRandomSeedFileIfEnabled (DcmTLSTransportLayer &layer)
 Update the random seed file if this was requested by the given command line arguments. More...
 

Static Public Member Functions

static void printLibraryVersion ()
 Print OpenSSL library version string. More...
 

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 ( class OFConsoleApplication app,
class OFCommandLine cmd 
)

Constructor.

Parameters
appa reference to an OFConsoleApplication object used in the calling application.
cmda reference to an OFCommandLine object used to parse the command line argument give to the calling application.

Member Function Documentation

◆ createTransportLayer()

OFrvalue<OFvariant<OFCondition,DcmTLSTransportLayer> > DcmTLSOptions::createTransportLayer ( int  networkRole)

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

Parameters
networkRolethe network role to create a transport layer for, DICOM_APPLICATION_ACCEPTOR or DICOM_APPLICATION_REQUESTOR.
Returns
Either a newly created DcmTLSTransportLayer object or an OFCondition indicating why no DcmTLSTransportLayer object was created. There are two possible reasons why this might happen: either the given command line arguments did not request to use a secure transport layer - in this case EC_Normal will be returned indicating one should simply ignore the result - or an error occurred when trying to create the DcmTLSTransport layer. In the latter case the returned OFCondition will contain an error condition describing what went wrong.

◆ parseArguments()

OFCondition DcmTLSOptions::parseArguments ( )

Parse and evaluate the given command line arguments.

Returns
EC_Normal on success, an error condition indicating what went wrong if any invalid argument was encountered, e.g. a selected ciphersuite is not supported.

◆ printLibraryVersion()

static void DcmTLSOptions::printLibraryVersion ( )
static

Print OpenSSL library version string.

Does nothing if OpenSSL is not available.

◆ writeRandomSeedFileIfEnabled()

OFCondition DcmTLSOptions::writeRandomSeedFileIfEnabled ( DcmTLSTransportLayer layer)

Update the random seed file if this was requested by the given command line arguments.

Parameters
layera reference to a DcmTLSTransportLayer object that contains the information for updating the random seed file, e.g. created via createTransportLayer().
Returns
EC_Normal if the random seed file was successfully updated or if the user did not request the random seed file to be update. An error condition indicating what went wrong in case the random seed file could not be updated.

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


Generated on Mon Feb 5 2018 for DCMTK Version 3.6.3 by Doxygen 1.8.14