XRootD
Loading...
Searching...
No Matches
XrdCryptoAux.cc File Reference
Include dependency graph for XrdCryptoAux.cc:

Go to the source code of this file.

Functions

void XrdCryptoSetTrace (kXR_int32 trace)
time_t XrdCryptoTZCorr ()

Variables

XrdOucTrace * cryptoTrace = 0
static XrdSysError eDest (0,"crypto_")
static XrdSysLogger Logger
static time_t TZCorr = 0
static bool TZInitialized = 0

Function Documentation

◆ XrdCryptoSetTrace()

void XrdCryptoSetTrace ( kXR_int32 trace)

Definition at line 49 of file XrdCryptoAux.cc.

50{
51 // Set trace flags according to 'trace'
52
53 //
54 // Initiate error logging and tracing
56 if (!cryptoTrace)
58 if (cryptoTrace) {
59 // Set debug mask
60 cryptoTrace->What = 0;
61 // Low level only
62 if ((trace & cryptoTRACE_Notify))
64 // Medium level
65 if ((trace & cryptoTRACE_Debug))
67 // High level
68 if ((trace & cryptoTRACE_Dump))
70 }
71}
XrdOucTrace * cryptoTrace
static XrdSysLogger Logger
#define cryptoTRACE_Notify
#define cryptoTRACE_Dump
#define cryptoTRACE_Debug
#define cryptoTRACE_ALL
XrdSysError eDest(0, "HttpMon")
XrdOucTrace(XrdSysError *erp)
XrdSysLogger * logger(XrdSysLogger *lp=0)

References XrdOucTrace::XrdOucTrace(), cryptoTrace, cryptoTRACE_ALL, cryptoTRACE_Debug, cryptoTRACE_Dump, cryptoTRACE_Notify, eDest, Logger, XrdSysError::logger(), XrdOucTrace::What, and XrdCryptoSetTrace().

Referenced by XrdSecProtocolgsi::Init(), XrdSecProtocolpwd::Init(), main(), XrdCryptoKDFun(), and XrdCryptoSetTrace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ XrdCryptoTZCorr()

time_t XrdCryptoTZCorr ( )

Definition at line 77 of file XrdCryptoAux.cc.

78{
79 // Time Zone correction (wrt UTC)
80 // Assumes no DST, the correction is not expected to change during the year
81
82 if (!TZInitialized) {
83 time_t now = time(0);
84 struct tm ltn, gtn;
85 if (localtime_r(&now, &ltn) != 0 && gmtime_r(&now, &gtn) != 0) {
86 TZCorr = time_t(difftime(mktime(&ltn), mktime(&gtn)));
87 TZInitialized = 1;
88 }
89 }
90 // Done
91 return TZCorr;
92}
static time_t TZCorr
static bool TZInitialized

References TZCorr, TZInitialized, and XrdCryptoTZCorr().

Referenced by Display(), XrdCryptoKDFun(), XrdCryptosslASN1toUTC(), and XrdCryptoTZCorr().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cryptoTrace

XrdOucTrace* cryptoTrace = 0

Definition at line 39 of file XrdCryptoAux.cc.

Referenced by XrdCryptoSetTrace().

◆ eDest

XrdSysError eDest(0,"crypto_") ( 0 ,
"crypto_"  )
static

◆ Logger

XrdSysLogger Logger
static

Definition at line 37 of file XrdCryptoAux.cc.

Referenced by XrdCryptoSetTrace().

◆ TZCorr

time_t TZCorr = 0
static

Definition at line 42 of file XrdCryptoAux.cc.

Referenced by XrdCryptoTZCorr().

◆ TZInitialized

bool TZInitialized = 0
static

Definition at line 43 of file XrdCryptoAux.cc.

Referenced by XrdCryptoTZCorr().