XrdTls Class Reference
#include <XrdTls.hh>
List of all members.
Public Types |
enum | RC {
TLS_AOK = 0,
TLS_CON_Closed,
TLS_CRT_Missing,
TLS_CTX_Missing,
TLS_HNV_Error,
TLS_SSL_Error,
TLS_SYS_Error,
TLS_UNK_Error,
TLS_VER_Error,
TLS_WantAccept,
TLS_WantConnect,
TLS_WantRead,
TLS_WantWrite
} |
typedef void(* | msgCB_t )(const char *tid, const char *msg, bool sslmsg) |
Static Public Member Functions |
static void | Emsg (const char *tid, const char *msg=0, bool flush=true) |
static std::string | RC2Text (XrdTls::RC rc, bool dbg=false) |
static void | SetMsgCB (msgCB_t cbP) |
static void | SetDebug (int opts, XrdSysLogger *logP=0) |
static void | SetDebug (int opts, msgCB_t logP) |
static RC | ssl2RC (int sslrc) |
static const char * | ssl2Text (int sslrc, const char *dflt="unknown_error") |
static void | ClearErrorQueue () |
| Clear the SSL error queue for the calling thread.
|
Static Public Attributes |
static const int | dbgOFF = 0 |
| Turn debugging off (initial deault).
|
static const int | dbgCTX = 1 |
| Turn debugging in for context operations.
|
static const int | dbgSOK = 2 |
| Turn debugging in for socket operations.
|
static const int | dbgSIO = 4 |
| Turn debugging in for socket I/O.
|
static const int | dbgALL = 7 |
| Turn debugging for everything.
|
static const int | dbgOUT = 8 |
| Force msgs to stderr for easier client debug.
|
Member Typedef Documentation
typedef void(* XrdTls::msgCB_t)(const char *tid, const char *msg, bool sslmsg) |
Set the message callback.
- Parameters:
-
| cbP | Pointer to the message callback function. If nil, messages are sent to stderr. This is a global setting. |
- Note:
- You should establish a callback once in the main thread.
Member Enumeration Documentation
- Enumerator:
TLS_AOK |
All went well, will always be zero.
|
TLS_CON_Closed |
TLS connection has been closed.
|
TLS_CRT_Missing |
The x509 certificate missing.
|
TLS_CTX_Missing |
The TLS context is missing.
|
TLS_HNV_Error |
A hostname validation error occuured.
|
TLS_SSL_Error |
An SSL error occurred.
|
TLS_SYS_Error |
A system call error occurred.
|
TLS_UNK_Error |
An unknown error occurred.
|
TLS_VER_Error |
Certificate verification failed.
|
TLS_WantAccept |
Reissue call when Accept() completes.
|
TLS_WantConnect |
Reissue call when Connect() completes.
|
TLS_WantRead |
Reissue call when reads do not block.
|
TLS_WantWrite |
Reissue call when writes do not block.
|
Member Function Documentation
static void XrdTls::ClearErrorQueue |
( |
|
) |
[static] |
Clear the SSL error queue for the calling thread.
static void XrdTls::Emsg |
( |
const char * |
tid, |
|
|
const char * |
msg = 0 , |
|
|
bool |
flush = true | |
|
) |
| | [static] |
Route an optional error message and flush outstanding messages.
- Parameters:
-
| tid | - Optional trace identifier. |
| msg | - An optional message. |
| flush | - If true prints all outstanding ssl messages. Otherwise, it clears all outstanding sll messages. |
static std::string XrdTls::RC2Text |
( |
XrdTls::RC |
rc, |
|
|
bool |
dbg = false | |
|
) |
| | [static] |
Convert TLS RC code to a reason string.
- Parameters:
-
| rc | - The TLS return code. |
| dbg | - True to include additional identifying text. Otherwise, a concise message decribing the error is returned. |
- Returns:
- A string describing the error.
static void XrdTls::SetDebug |
( |
int |
opts, |
|
|
msgCB_t |
logP | |
|
) |
| | [static] |
static void XrdTls::SetDebug |
( |
int |
opts, |
|
|
XrdSysLogger * |
logP = 0 | |
|
) |
| | [static] |
static void XrdTls::SetMsgCB |
( |
msgCB_t |
cbP |
) |
[static] |
static RC XrdTls::ssl2RC |
( |
int |
sslrc |
) |
[static] |
Convert SSL error to TLS::RC code.
- Parameters:
-
| sslerr | - the SSL error return code. |
- Returns:
- The corresponding TLS::RC code.
static const char* XrdTls::ssl2Text |
( |
int |
sslrc, |
|
|
const char * |
dflt = "unknown_error" | |
|
) |
| | [static] |
Convert SSL error to text.
- Parameters:
-
| sslerr | - the SSL error return code. |
| dflt | - the default to be return when mapping does no exist. |
- Returns:
- The corresponding text or the dflt string is returned.
- Note:
- This is provided because some versions of OpenSSL do not provide a reasonable textual reason no matter what you use.
Member Data Documentation
Turn debugging for everything.
Turn debugging in for context operations.
Turn debugging off (initial deault).
Set debugging on or off.
- Parameters:
-
| opts | One of or more of the options below. |
| logP | Pointer to XrdSysLogger or the message callback (see above) to route messages. If nil messages are routed to stderr. |
Force msgs to stderr for easier client debug.
Turn debugging in for socket I/O.
Turn debugging in for socket operations.
The documentation for this class was generated from the following file: