A class that handles the TLS options for DCMTK applications.
More...
|
| 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.
|
|
A class that handles the TLS options for DCMTK applications.
DcmTLSOptionsBase allows a derived class to store the relevant options and to create a DcmTLSTransportLayer object based on the collected information.
◆ DcmTLSOptionsBase()
DcmTLSOptionsBase::DcmTLSOptionsBase |
( |
T_ASC_NetworkRole |
networkRole | ) |
|
Constructor.
- Parameters
-
networkRole | the network role to create a transport layer for |
◆ getTransportLayer()
Returns a pointer to the transport layer object, or NULL if the object has not yet been created by a call to createTransportLayer().
- Returns
- pointer to transport layer object, may be NULL.
◆ isRootCertificate()
virtual OFCondition DcmTLSOptionsBase::isRootCertificate |
( |
const char * |
fileName | ) |
|
|
virtual |
loads a certificate file and checks whether it is a valid (e.g.
non-expired), self-signed root certificate that can be verified against itself
- Parameters
-
fileName | path to the certificate file |
- Returns
- EC_Normal if certificate is a root certificate, an error code otherwise
◆ listOfCiphersRequested()
static OFBool DcmTLSOptionsBase::listOfCiphersRequested |
( |
OFCommandLine & |
cmd | ) |
|
|
static |
checks if the command line option –list-ciphers was given.
In this case the list of supported TLS ciphersuites should be printed to stdout and the application should terminate.
- Parameters
-
cmd | the command line that was used |
- Returns
- true if –list-ciphers option was found, false otherwise.
◆ printLibraryVersion()
static void DcmTLSOptionsBase::printLibraryVersion |
( |
| ) |
|
|
static |
Print OpenSSL library version string.
Does nothing if OpenSSL is not available.
◆ printSupportedCiphersuites()
static void DcmTLSOptionsBase::printSupportedCiphersuites |
( |
OFConsoleApplication & |
app, |
|
|
STD_NAMESPACE ostream & |
os |
|
) |
| |
|
static |
print a list of supported ciphersuites to the given output stream
- Parameters
-
◆ secureConnectionRequested()
virtual OFBool DcmTLSOptionsBase::secureConnectionRequested |
( |
| ) |
const |
|
virtual |
Returns true if a secure connection was requested, false otherwise.
Caller must ensure that parseArguments() has been run before this method.
- Returns
- true if secure connection requested, false otherwise
◆ verifyClientCertificate()
virtual OFCondition DcmTLSOptionsBase::verifyClientCertificate |
( |
const char * |
fileName | ) |
|
|
virtual |
loads a certificate or certificate chain from a file and checks whether it can be verified against the current settings of the trust store.
- Parameters
-
fileName | path to the certificate file |
- Returns
- EC_Normal if verification succeeded, an error code otherwise
◆ writeRandomSeed()
virtual OFCondition DcmTLSOptionsBase::writeRandomSeed |
( |
| ) |
|
|
virtual |
Update the random seed file if this was requested by the given command line arguments.
- 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.
◆ opt_certificateFile
const char* DcmTLSOptionsBase::opt_certificateFile |
|
protected |
filename of certificate file we use to authenticate ourselves
◆ opt_certVerification
indicates whether we should verify the remote peer's certificate
◆ opt_clientSNI
const char* DcmTLSOptionsBase::opt_clientSNI |
|
protected |
SNI server name to be requested in outgoing connections.
◆ opt_crlMode
◆ opt_dhparam
const char* DcmTLSOptionsBase::opt_dhparam |
|
protected |
filename of Diffie-Hellman parameters file, may be NULL
◆ opt_doAuthenticate
OFBool DcmTLSOptionsBase::opt_doAuthenticate |
|
protected |
flag indicating whether we will authenticate ourselves using a certificate and private key
◆ opt_keyFileFormat
flag indicating the file format of certificates and private keys: PEM or ASN.1
◆ opt_passwd
const char* DcmTLSOptionsBase::opt_passwd |
|
protected |
password for reading the private key file, may be NULL.
In this case the password is read from STDIN.
◆ opt_privateKeyFile
const char* DcmTLSOptionsBase::opt_privateKeyFile |
|
protected |
filename of private key file we use to authenticate ourselves
◆ opt_readSeedFile
const char* DcmTLSOptionsBase::opt_readSeedFile |
|
protected |
filename of file containing at least 1K of entropy used to seed the PRNG
◆ opt_secureConnection
OFBool DcmTLSOptionsBase::opt_secureConnection |
|
protected |
a flag indicating whether or not a secure connection was requested
◆ opt_serverSNI
const char* DcmTLSOptionsBase::opt_serverSNI |
|
protected |
SNI server name to be expected in incoming connections.
◆ opt_tlsProfile
DICOM TLS Security Profile selected.
◆ opt_writeSeedFile
const char* DcmTLSOptionsBase::opt_writeSeedFile |
|
protected |
filename to which the modified PRNG state is written back
◆ tLayer
pointer to the secure transport layer managed by this object
The documentation for this class was generated from the following file:
- dcmtls/include/dcmtk/dcmtls/tlsopt.h