Inheritance diagram for DcmTLSTransportLayer:
Public Member Functions | |
DcmTLSTransportLayer (int networkRole, const char *randFile) | |
constructor. | |
virtual | ~DcmTLSTransportLayer () |
destructor | |
virtual DcmTransportConnection * | createConnection (int openSocket, OFBool useSecureLayer) |
factory method that returns a new transport connection for the given socket. | |
DcmTransportLayerStatus | setPrivateKeyFile (const char *fileName, int fileType) |
loads the private key used for authentication of this application from a file. | |
DcmTransportLayerStatus | setCertificateFile (const char *fileName, int fileType) |
loads the certificate (public key) used for authentication of this application from a file. | |
OFBool | checkPrivateKeyMatchesCertificate () |
checks if the private key and the certificate set using setPrivateKeyFile() and setCertificateFile() match, i.e. | |
DcmTransportLayerStatus | addTrustedCertificateFile (const char *fileName, int fileType) |
loads a certificate from a file and adds it to the pool of trusted certificates. | |
DcmTransportLayerStatus | addTrustedCertificateDir (const char *pathName, int fileType) |
loads all files as certificates from the specified directory and adds them to the pool of trusted certificates. | |
DcmTransportLayerStatus | setCipherSuites (const char *suites) |
sets the list of ciphersuites to negotiate. | |
OFBool | canWriteRandomSeed () |
checks if enough entropy data is available to write back a modified random seed file. | |
OFBool | writeRandomSeed (const char *randFile) |
writes a modified random seed to file. | |
void | seedPRNG (const char *randFile) |
adds the contents of a file to the seed for the cryptographic pseudo-random number generator. | |
void | addPRNGseed (void *buf, size_t bufSize) |
modifies the PRNG by adding random data from the given buffer to the PRNG state. | |
void | setCertificateVerification (DcmCertificateVerification vtype) |
defines how peer certificates should be treated when negotiating a TLS connection. | |
void | setPrivateKeyPasswd (const char *thePasswd) |
sets the password string to be used when loading an encrypted private key file. | |
void | setPrivateKeyPasswdFromConsole () |
sets the password string to be used when loading an encrypted private key file to be read from the console stdin. | |
OFBool | setTempDHParameters (const char *filename) |
loads a set of Diffie-Hellman parameters from file. | |
Static Public Member Functions | |
static unsigned long | getNumberOfCipherSuites () |
returns the number of known ciphersuites. | |
static const char * | getTLSCipherSuiteName (unsigned long idx) |
returns a ciphersuite name in RFC 2246 (TLS) form | |
static const char * | getOpenSSLCipherSuiteName (unsigned long idx) |
returns a ciphersuite name in OpenSSL form | |
static const char * | findOpenSSLCipherSuiteName (const char *tlsCipherSuiteName) |
finds the OpenSSL ciphersuite name for a given RFC 2246 ciphersuite name. | |
static void | printX509Certificate (ostream &out, X509 *peerCertificate) |
prints the most important attributes of the given X.509 certificate to the given output stream. | |
Private Member Functions | |
DcmTLSTransportLayer (const DcmTLSTransportLayer &) | |
private undefined copy constructor | |
DcmTLSTransportLayer & | operator= (const DcmTLSTransportLayer &) |
private undefined assignment operator | |
Private Attributes | |
SSL_CTX * | transportLayerContext |
OpenSSL context data, needed only once per application. | |
OFBool | canWriteRandseed |
true if there is enough random data to write a new random seed file | |
OFString | privateKeyPasswd |
contains the password for the private key if set on command line |
the pool of trusted certificates, the key and certificate to be used for authentication and the list of ciphersuite to be used for association negotiation.
Definition at line 73 of file tlslayer.h.
|
constructor.
|
|
modifies the PRNG by adding random data from the given buffer to the PRNG state.
|
|
loads all files as certificates from the specified directory and adds them to the pool of trusted certificates.
|
|
loads a certificate from a file and adds it to the pool of trusted certificates.
|
|
checks if enough entropy data is available to write back a modified random seed file.
Definition at line 171 of file tlslayer.h. References canWriteRandseed. |
|
checks if the private key and the certificate set using setPrivateKeyFile() and setCertificateFile() match, i.e. if they establish a private/public key pair.
|
|
factory method that returns a new transport connection for the given socket. Depending on the second parameter, either a transparent or a secure connection is established. If the object cannot be created (e. g. because no secure layer is available), returns NULL.
Reimplemented from DcmTransportLayer. |
|
finds the OpenSSL ciphersuite name for a given RFC 2246 ciphersuite name.
|
|
returns the number of known ciphersuites.
|
|
returns a ciphersuite name in OpenSSL form
|
|
returns a ciphersuite name in RFC 2246 (TLS) form
|
|
prints the most important attributes of the given X.509 certificate to the given output stream.
|
|
adds the contents of a file to the seed for the cryptographic pseudo-random number generator. The file should contain real random entropy data gathered from keystrokes, system events, /dev/random (on Linux) or something similar. If the TLS layer object is not initialized with sufficient random data, negotiation of TLS connections may fail.
|
|
loads the certificate (public key) used for authentication of this application from a file.
|
|
defines how peer certificates should be treated when negotiating a TLS connection.
|
|
sets the list of ciphersuites to negotiate.
|
|
loads the private key used for authentication of this application from a file.
|
|
sets the password string to be used when loading an encrypted private key file. Must be called prior to setPrivateKeyFile() in order to be effective.
|
|
loads a set of Diffie-Hellman parameters from file. These parameters are required for DH, DHE or DSS ciphersuites.
|
|
writes a modified random seed to file.
|