xrootd
|
TLS layer for socket connection. More...
#include <XrdClTls.hh>
Public Member Functions | |
Tls (Socket *socket, AsyncSocketHandler *socketHandler) | |
Constructor - creates async TLS layer for given socker file descriptor. | |
~Tls () | |
Destructor. | |
XRootDStatus | Connect (const std::string &thehost, XrdNetAddrInfo *netInfo) |
Establish a TLS/SSL session and perform host verification. | |
XRootDStatus | Read (char *buffer, size_t size, int &bytesRead) |
XRootDStatus | ReadV (iovec *iov, int iocnt, int &bytesRead) |
XRootDStatus | Send (const char *buffer, size_t size, int &bytesWritten) |
void | Shutdown () |
Shutdown the TLS/SSL connection. | |
uint8_t | MapEvent (uint8_t event) |
Static Public Member Functions | |
static void | ClearErrorQueue () |
Clear the error queue for the calling thread. | |
Private Types | |
enum | TlsHSRevert { None , ReadOnWrite , WriteOnRead } |
Private Member Functions | |
XRootDStatus | ToStatus (XrdTls::RC rc) |
Translate OPEN SSL error code into XRootD Status. | |
Private Attributes | |
Socket * | pSocket |
The underlying vanilla socket. | |
std::unique_ptr< XrdTlsSocket > | pTls |
The TSL I/O wrapper over socket. | |
TlsHSRevert | pTlsHSRevert |
AsyncSocketHandler * | pSocketHandler |
Socket handler (for enabling/disabling write notification) | |
TLS layer for socket connection.
|
private |
Flags to indicate what is the TLS hand-shake revert state
Enumerator | |
---|---|
None | |
ReadOnWrite | |
WriteOnRead |
XrdCl::Tls::Tls | ( | Socket * | socket, |
AsyncSocketHandler * | socketHandler | ||
) |
Constructor - creates async TLS layer for given socker file descriptor.
|
inline |
Destructor.
|
static |
Clear the error queue for the calling thread.
XRootDStatus XrdCl::Tls::Connect | ( | const std::string & | thehost, |
XrdNetAddrInfo * | netInfo | ||
) |
Establish a TLS/SSL session and perform host verification.
uint8_t XrdCl::Tls::MapEvent | ( | uint8_t | event | ) |
Map:
XRootDStatus XrdCl::Tls::Read | ( | char * | buffer, |
size_t | size, | ||
int & | bytesRead | ||
) |
Read through the TLS layer from the socket If necessary, will establish a TLS/SSL session.
XRootDStatus XrdCl::Tls::ReadV | ( | iovec * | iov, |
int | iocnt, | ||
int & | bytesRead | ||
) |
(Fake) ReadV through the TLS layer from the socket If necessary, will establish a TLS/SSL session.
XRootDStatus XrdCl::Tls::Send | ( | const char * | buffer, |
size_t | size, | ||
int & | bytesWritten | ||
) |
Write through the TLS layer to the socket If necessary, will establish a TLS/SSL session.
void XrdCl::Tls::Shutdown | ( | ) |
Shutdown the TLS/SSL connection.
|
private |
Translate OPEN SSL error code into XRootD Status.
|
private |
The underlying vanilla socket.
|
private |
Socket handler (for enabling/disabling write notification)
|
private |
The TSL I/O wrapper over socket.
|
private |