xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdTlsPeerCerts Class Reference

#include <XrdTlsPeerCerts.hh>

Public Member Functions

X509 * getCert (bool upref=true)
 
 STACK_OF (X509) *getChain()
 
bool hasCert ()
 
bool hasChain ()
 
 XrdTlsPeerCerts (X509 *pCert=0, STACK_OF(X509) *pChain=0)
 
 ~XrdTlsPeerCerts ()
 

Private Member Functions

 STACK_OF (X509) *chain
 

Private Attributes

X509 * cert
 

Constructor & Destructor Documentation

◆ XrdTlsPeerCerts()

XrdTlsPeerCerts::XrdTlsPeerCerts ( X509 *  pCert = 0,
STACK_OF(X509) *  pChain = 0 
)
inline

Constructor

Parameters
pCert- pointer to the cert.
pChain- pointer to the chain.

◆ ~XrdTlsPeerCerts()

XrdTlsPeerCerts::~XrdTlsPeerCerts ( )

Member Function Documentation

◆ getCert()

X509 * XrdTlsPeerCerts::getCert ( bool  upref = true)

Obtain pointer to the cert.

Parameters
uprefWhen true the cert reference count is increased by one. Otherwise, the reference count stays the same (see note).
Returns
Upon success, the pointer to the cert is returned. Upon failure, a nil pointer is returned.
Note
If the cert is being passed to a method that will call X509_free() on the cert (many do) the reference count must be increased as the destructor decreases the reference count. Incorrrect handling of the reference count will invariable SEGV when the session is freed. Do not pass the cert to an opaque method without verifying how it handles the cert upon return.

◆ hasCert()

bool XrdTlsPeerCerts::hasCert ( )
inline

Check if this object has a cert.

Returns
True if a cert is present and false otherwise.

References cert.

◆ hasChain()

bool XrdTlsPeerCerts::hasChain ( )
inline

Check if this object has a chain.

Returns
True if a chain is present and false otherwise.

◆ STACK_OF() [1/2]

XrdTlsPeerCerts::STACK_OF ( X509  )
private

◆ STACK_OF() [2/2]

XrdTlsPeerCerts::STACK_OF ( X509  )
inline

Obtain pointer to the chain.

Returns
Upon success, the pointer to the cert is returned which may be nil if there is no chain.
Note
The chain is the actual chain associated with the SSL session. When he SSL session is freed, the chain becomes invalid and all references to it must cease.

Member Data Documentation

◆ cert

X509* XrdTlsPeerCerts::cert
private

Referenced by hasCert().


The documentation for this class was generated from the following file: