XRootD
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

XrdOucTracecryptoTrace = 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
Definition: XrdCryptoAux.cc:39
static XrdSysLogger Logger
Definition: XrdCryptoAux.cc:37
static XrdSysError eDest(0,"crypto_")
#define cryptoTRACE_Notify
Definition: XrdCryptoAux.hh:49
#define cryptoTRACE_Dump
Definition: XrdCryptoAux.hh:47
#define cryptoTRACE_Debug
Definition: XrdCryptoAux.hh:48
#define cryptoTRACE_ALL
Definition: XrdCryptoAux.hh:46
XrdSysLogger * logger(XrdSysLogger *lp=0)
Definition: XrdSysError.hh:175

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

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

+ 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
Definition: XrdCryptoAux.cc:42
static bool TZInitialized
Definition: XrdCryptoAux.cc:43

References TZCorr, and TZInitialized.

Referenced by Display(), and XrdCryptosslASN1toUTC().

+ 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_") ( ,
"crypto_"   
)
static

Referenced by XrdCryptoSetTrace().

◆ 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().