DCMTK Version 3.6.7
OFFIS DICOM Toolkit
|
this class represents a TLS (Transport Layer Security) V1 based secure transport connection. More...
Public Member Functions | |
DcmTLSConnection (DcmNativeSocketType openSocket, SSL *newTLSConnection) | |
constructor. More... | |
virtual | ~DcmTLSConnection () |
destructor | |
virtual OFCondition | serverSideHandshake () |
performs server side handshake on established socket. More... | |
virtual OFCondition | clientSideHandshake () |
performs client side handshake on established socket. More... | |
virtual OFCondition | renegotiate (const char *newSuite) |
performs a re-negotiation of the connection with different connection parameters. More... | |
virtual ssize_t | read (void *buf, size_t nbyte) |
attempts to read nbyte bytes from the transport connection and writes them into the given buffer. More... | |
virtual ssize_t | write (void *buf, size_t nbyte) |
attempts to write nbyte bytes from the given buffer to the transport connection. More... | |
virtual void | close () |
Closes the transport connection. More... | |
virtual void | closeTransportConnection () |
Closes the transport connection directly. More... | |
virtual unsigned long | getPeerCertificateLength () |
returns the size in bytes of the peer certificate of a secure connection. More... | |
virtual OFBool | networkDataAvailable (int timeout) |
checks if data is available to be read on the transport connection. More... | |
virtual OFBool | isTransparentConnection () |
returns OFTrue if this connection is a transparent TCP connection, OFFalse if the connection is a secure connection. | |
virtual OFString & | dumpConnectionParameters (OFString &str) |
dump the characteristics of the current connection More... | |
Public Member Functions inherited from DcmTransportConnection | |
DcmTransportConnection (DcmNativeSocketType openSocket) | |
constructor. More... | |
virtual | ~DcmTransportConnection () |
destructor | |
virtual OFCondition | serverSideHandshake ()=0 |
performs server side handshake on established socket. More... | |
virtual OFCondition | clientSideHandshake ()=0 |
performs client side handshake on established socket. More... | |
virtual OFCondition | renegotiate (const char *newSuite)=0 |
performs a re-negotiation of the connection with different connection parameters. More... | |
virtual ssize_t | read (void *buf, size_t nbyte)=0 |
attempts to read nbyte bytes from the transport connection and writes them into the given buffer. More... | |
virtual ssize_t | write (void *buf, size_t nbyte)=0 |
attempts to write nbyte bytes from the given buffer to the transport connection. More... | |
virtual void | close ()=0 |
Closes the transport connection. More... | |
virtual void | closeTransportConnection ()=0 |
Closes the transport connection directly. More... | |
virtual unsigned long | getPeerCertificateLength ()=0 |
returns the size in bytes of the peer certificate of a secure connection. More... | |
virtual OFBool | networkDataAvailable (int timeout)=0 |
checks if data is available to be read on the transport connection. More... | |
virtual OFBool | isTransparentConnection ()=0 |
returns OFTrue if this connection is a transparent TCP connection, OFFalse if the connection is a secure connection. | |
virtual OFString & | dumpConnectionParameters (OFString &str)=0 |
dump the characteristics of the current connection More... | |
void | dumpConnectionParameters (STD_NAMESPACE ostream &out) |
prints the characteristics of the current connection on the given output stream. More... | |
Private Member Functions | |
DcmTLSConnection (const DcmTLSConnection &) | |
private undefined copy constructor | |
DcmTLSConnection & | operator= (const DcmTLSConnection &) |
private undefined assignment operator | |
void | logTLSConnection () |
dump TLS connection details to debug logger | |
Private Attributes | |
SSL * | tlsConnection |
pointer to the TLS connection structure used by the OpenSSL library | |
Additional Inherited Members | |
Static Public Member Functions inherited from DcmTransportConnection | |
static OFBool | selectReadableAssociation (DcmTransportConnection *connections[], int connCount, int timeout) |
indicates which of the specified transport connections is ready for reading. More... | |
Protected Member Functions inherited from DcmTransportConnection | |
DcmNativeSocketType | getSocket () |
returns the socket file descriptor managed by this object. More... | |
void | setSocket (DcmNativeSocketType socket) |
set the socket file descriptor managed by this object. More... | |
this class represents a TLS (Transport Layer Security) V1 based secure transport connection.
DcmTLSConnection::DcmTLSConnection | ( | DcmNativeSocketType | openSocket, |
SSL * | newTLSConnection | ||
) |
constructor.
openSocket | TCP/IP socket to be used for the transport connection. the connection must already be established on socket level. This object takes over control of the socket. |
newTLSConnection | pointer to initialized OpenSSL connection object to be used for this connection. |
|
virtual |
performs client side handshake on established socket.
This function is used to establish a secure transport connection over the established TCP connection.
Implements DcmTransportConnection.
|
virtual |
Closes the transport connection.
If a secure connection is used, a closure alert is sent before the connection is closed.
Implements DcmTransportConnection.
|
virtual |
Closes the transport connection directly.
If a secure connection is used, a closure alert is NOT sent before the connection is closed.
Implements DcmTransportConnection.
dump the characteristics of the current connection
str | the string to dump into |
Implements DcmTransportConnection.
|
virtual |
returns the size in bytes of the peer certificate of a secure connection.
Implements DcmTransportConnection.
|
virtual |
checks if data is available to be read on the transport connection.
timeout | maximum number of seconds to wait if no data is available. If this parameter is 0, the function does not block. |
Implements DcmTransportConnection.
|
virtual |
attempts to read nbyte bytes from the transport connection and writes them into the given buffer.
buf | buffer |
nbyte | number of bytes to read |
Implements DcmTransportConnection.
|
virtual |
performs a re-negotiation of the connection with different connection parameters.
Used to change the parameters of the secure transport connection.
newSuite | string identifying the ciphersuite to be negotiated. |
Implements DcmTransportConnection.
|
virtual |
performs server side handshake on established socket.
This function is used to establish a secure transport connection over the established TCP connection.
Implements DcmTransportConnection.
|
virtual |
attempts to write nbyte bytes from the given buffer to the transport connection.
buf | buffer |
nbyte | number of bytes to write |
Implements DcmTransportConnection.