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 | Send (const char *buffer, size_t size, int &bytesWritten) |
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.
enum XrdCl::Tls::TlsHSRevert [private] |
Flags to indicate what is the TLS hand-shake revert state
XrdCl::Tls::Tls | ( | Socket * | socket, | |
AsyncSocketHandler * | socketHandler | |||
) |
Constructor - creates async TLS layer for given socker file descriptor.
XrdCl::Tls::~Tls | ( | ) | [inline] |
Destructor.
static void XrdCl::Tls::ClearErrorQueue | ( | ) | [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: in case the TLS layer requested reads on writes map ReadyToWrite to ReadyToRead in case the TLS layer requested writes on reads map ReadyToRead to ReadyToWrite
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::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.
XRootDStatus XrdCl::Tls::ToStatus | ( | XrdTls::RC | rc | ) | [private] |
Translate OPEN SSL error code into XRootD Status.
Socket* XrdCl::Tls::pSocket [private] |
The underlying vanilla socket.
AsyncSocketHandler* XrdCl::Tls::pSocketHandler [private] |
Socket handler (for enabling/disabling write notification).
std::unique_ptr<XrdTlsSocket> XrdCl::Tls::pTls [private] |
The TSL I/O wrapper over socket.
TlsHSRevert XrdCl::Tls::pTlsHSRevert [private] |