XrdCl::Tls Class Reference

TLS layer for socket connection. More...

#include <XrdClTls.hh>

Collaboration diagram for XrdCl::Tls:
Collaboration graph
[legend]

List of all members.

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

SocketpSocket
 The underlying vanilla socket.
std::unique_ptr< XrdTlsSocketpTls
 The TSL I/O wrapper over socket.
TlsHSRevert pTlsHSRevert
AsyncSocketHandlerpSocketHandler
 Socket handler (for enabling/disabling write notification).

Detailed Description

TLS layer for socket connection.


Member Enumeration Documentation

enum XrdCl::Tls::TlsHSRevert [private]

Flags to indicate what is the TLS hand-shake revert state

  • None : there is no revert state
  • ReadOnWrite : OnRead routines will be called on write event due to TLS handshake
  • WriteOnRead : OnWrite routines will be called on read event due to TLS handshake
Enumerator:
None 
ReadOnWrite 
WriteOnRead 

Constructor & Destructor Documentation

XrdCl::Tls::Tls ( Socket socket,
AsyncSocketHandler socketHandler 
)

Constructor - creates async TLS layer for given socker file descriptor.

XrdCl::Tls::~Tls (  )  [inline]

Destructor.


Member Function Documentation

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.


Member Data Documentation

The underlying vanilla socket.

Socket handler (for enabling/disabling write notification).

std::unique_ptr<XrdTlsSocket> XrdCl::Tls::pTls [private]

The TSL I/O wrapper over socket.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 7 Jul 2020 for xrootd by  doxygen 1.6.1