![]() |
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. More... | |
~Tls () | |
Destructor. More... | |
XRootDStatus | Connect (const std::string &thehost, XrdNetAddrInfo *netInfo) |
Establish a TLS/SSL session and perform host verification. More... | |
uint8_t | MapEvent (uint8_t event) |
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. More... | |
Static Public Member Functions | |
static void | ClearErrorQueue () |
Clear the error queue for the calling thread. More... | |
TLS layer for socket connection.
Definition at line 39 of file XrdClTls.hh.
XrdCl::Tls::Tls | ( | Socket * | socket, |
AsyncSocketHandler * | socketHandler | ||
) |
Constructor - creates async TLS layer for given socker file descriptor.
Definition at line 144 of file XrdClTls.cc.
References XrdCl::Socket::GetFD(), XrdCl::InitTLS(), XrdTlsSocket::TLS_HS_NOBLK, XrdTlsSocket::TLS_RNB_WNB, and tlsContext.
|
inline |
|
static |
Clear the error queue for the calling thread.
Definition at line 422 of file XrdClTls.cc.
References XrdTls::ClearErrorQueue().
XRootDStatus XrdCl::Tls::Connect | ( | const std::string & | thehost, |
XrdNetAddrInfo * | netInfo | ||
) |
Establish a TLS/SSL session and perform host verification.
Definition at line 162 of file XrdClTls.cc.
References XrdCl::AsyncSocketHandler::DisableUplink(), XrdCl::AsyncSocketHandler::EnableUplink(), XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::IsCorked(), XrdCl::Status::IsOK(), XrdCl::XRootDStatus::SetErrorMessage(), XrdTls::TLS_WantRead, XrdTls::TLS_WantWrite, XrdCl::TlsMsg, and XrdCl::Socket::Uncork().
uint8_t XrdCl::Tls::MapEvent | ( | uint8_t | event | ) |
Map:
Definition at line 402 of file XrdClTls.cc.
References XrdCl::SocketHandler::ReadyToRead, and XrdCl::SocketHandler::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.
Definition at line 216 of file XrdClTls.cc.
References XrdCl::AsyncSocketHandler::DisableUplink(), XrdCl::AsyncSocketHandler::EnableUplink(), XrdCl::Socket::IsCorked(), XrdCl::Status::IsOK(), XrdCl::stOK, XrdCl::suRetry, XrdTls::TLS_WantWrite, and XrdCl::Socket::Uncork().
Referenced by ReadV().
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.
Definition at line 279 of file XrdClTls.cc.
References Read(), and XrdCl::suRetry.
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.
Definition at line 294 of file XrdClTls.cc.
References XrdCl::AsyncSocketHandler::DisableUplink(), XrdCl::AsyncSocketHandler::EnableUplink(), XrdCl::Socket::IsCorked(), XrdCl::Status::IsOK(), XrdCl::stOK, XrdCl::suRetry, XrdTls::TLS_WantRead, and XrdCl::Socket::Uncork().
void XrdCl::Tls::Shutdown | ( | ) |
Shutdown the TLS/SSL connection.
Definition at line 362 of file XrdClTls.cc.