XRootD
Loading...
Searching...
No Matches
XrdCryptoAux.hh File Reference
#include <cstdio>
#include <ctime>
#include "XrdSys/XrdSysHeaders.hh"
#include "XProtocol/XProtocol.hh"
+ Include dependency graph for XrdCryptoAux.hh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ABSTRACTMETHOD(x)
 
#define cryptoTRACE_ALL   0x0007
 
#define cryptoTRACE_Debug   0x0002
 
#define cryptoTRACE_Dump   0x0004
 
#define cryptoTRACE_Notify   0x0001
 
#define XrdCryptoDefRSABits   2048
 
#define XrdCryptoDefRSAExp   0x10001
 
#define XrdCryptoMinRSABits   2048
 

Typedefs

typedef int(* XrdCryptoKDFun_t) (const char *pass, int plen, const char *salt, int slen, char *key, int klen)
 
typedef int(* XrdCryptoKDFunLen_t) ()
 

Functions

int XrdCryptoKDFun (const char *pass, int plen, const char *salt, int slen, char *key, int klen)
 
int XrdCryptoKDFunLen ()
 
void XrdCryptoSetTrace (kXR_int32 trace)
 
time_t XrdCryptoTZCorr ()
 

Variables

const time_t XrdCryptoDSTShift = 3600
 

Macro Definition Documentation

◆ ABSTRACTMETHOD

#define ABSTRACTMETHOD ( x)
Value:
{std::cerr <<"Method "<<x<<" must be overridden!" <<std::endl;}

Definition at line 41 of file XrdCryptoAux.hh.

Referenced by XrdCryptoCipher::AsBucket(), XrdCryptoX509::BitStrength(), XrdCryptoFactory::Cipher(), XrdCryptoFactory::Cipher(), XrdCryptoFactory::Cipher(), XrdCryptoFactory::Cipher(), XrdCryptoFactory::Cipher(), XrdCryptoFactory::Cipher(), XrdCryptoCipher::DecOutLength(), XrdCryptoCipher::Decrypt(), XrdCryptoRSA::DecryptPrivate(), XrdCryptoRSA::DecryptPublic(), XrdCryptoRSA::Dump(), XrdCryptoX509Crl::Dump(), XrdCryptoX509::DumpExtensions(), XrdCryptoCipher::EncOutLength(), XrdCryptoCipher::Encrypt(), XrdCryptoRSA::EncryptPrivate(), XrdCryptoRSA::EncryptPublic(), XrdCryptoX509::Export(), XrdCryptoX509Req::Export(), XrdCryptoRSA::ExportPrivate(), XrdCryptoRSA::ExportPublic(), XrdCryptoMsgDigest::Final(), XrdCryptoCipher::Finalize(), XrdCryptoX509::GetExtension(), XrdCryptoX509Req::GetExtension(), XrdCryptoRSA::GetOutlen(), XrdCryptoRSA::GetPrilen(), XrdCryptoRSA::GetPublen(), XrdCryptoFactory::HasPaddingSupport(), XrdCryptoRSA::ImportPrivate(), XrdCryptoRSA::ImportPublic(), XrdCryptoCipher::IsDefaultLength(), XrdCryptoX509Crl::IsRevoked(), XrdCryptoX509Crl::IsRevoked(), XrdCryptoX509::Issuer(), XrdCryptoX509Crl::Issuer(), XrdCryptoX509::IssuerHash(), XrdCryptoX509Crl::IssuerHash(), XrdCryptoCipher::IsValid(), XrdCryptoMsgDigest::IsValid(), XrdCryptoX509Crl::IsValid(), XrdCryptoX509Req::IsValid(), XrdCryptoCipher::IV(), XrdCryptoFactory::KDFun(), XrdCryptoFactory::KDFunLen(), XrdCryptoX509Crl::LastUpdate(), XrdCryptoCipher::MaxIVLength(), XrdCryptoFactory::MsgDigest(), XrdCryptoX509Crl::NextUpdate(), XrdCryptoX509::NotAfter(), XrdCryptoX509::NotBefore(), XrdCryptoRSA::Opaque(), XrdCryptoX509::Opaque(), XrdCryptoX509Crl::Opaque(), XrdCryptoX509Req::Opaque(), XrdCryptoX509::ParentFile(), XrdCryptoX509Crl::ParentFile(), XrdCryptoX509::PKI(), XrdCryptoX509Req::PKI(), XrdCryptoFactory::ProxyCertInfo(), XrdCryptoCipher::Public(), XrdCryptoCipher::RefreshIV(), XrdCryptoMsgDigest::Reset(), XrdCryptoFactory::RSA(), XrdCryptoFactory::RSA(), XrdCryptoFactory::RSA(), XrdCryptoX509::SerialNumber(), XrdCryptoX509::SerialNumberString(), XrdCryptoCipher::SetIV(), XrdCryptoFactory::SetPathLenConstraint(), XrdCryptoX509::SetPKI(), XrdCryptoFactory::SetTrace(), XrdCryptoX509::Subject(), XrdCryptoX509Req::Subject(), XrdCryptoX509::SubjectHash(), XrdCryptoX509Req::SubjectHash(), XrdCryptoFactory::SupportedCipher(), XrdCryptoFactory::SupportedMsgDigest(), XrdCryptoMsgDigest::Update(), XrdCryptoX509::Verify(), XrdCryptoX509Crl::Verify(), XrdCryptoX509Req::Verify(), XrdCryptoFactory::X509(), XrdCryptoFactory::X509(), XrdCryptoFactory::X509ChainToFile(), XrdCryptoFactory::X509CheckProxy3(), XrdCryptoFactory::X509CreateProxy(), XrdCryptoFactory::X509CreateProxyReq(), XrdCryptoFactory::X509Crl(), XrdCryptoFactory::X509Crl(), XrdCryptoFactory::X509ExportChain(), XrdCryptoFactory::X509GetVOMSAttr(), XrdCryptoFactory::X509ParseBucket(), XrdCryptoFactory::X509ParseFile(), XrdCryptoFactory::X509ParseStack(), XrdCryptoFactory::X509Req(), XrdCryptoFactory::X509SignProxyReq(), XrdCryptoFactory::X509VerifyCert(), and XrdCryptoFactory::X509VerifyChain().

◆ cryptoTRACE_ALL

#define cryptoTRACE_ALL   0x0007

Definition at line 46 of file XrdCryptoAux.hh.

Referenced by XrdCryptoSetTrace().

◆ cryptoTRACE_Debug

#define cryptoTRACE_Debug   0x0002

◆ cryptoTRACE_Dump

#define cryptoTRACE_Dump   0x0004

◆ cryptoTRACE_Notify

#define cryptoTRACE_Notify   0x0001

◆ XrdCryptoDefRSABits

#define XrdCryptoDefRSABits   2048

Definition at line 53 of file XrdCryptoAux.hh.

Referenced by gsiOptions::gsiOptions(), and XrdCryptosslRSA::XrdCryptosslRSA().

◆ XrdCryptoDefRSAExp

#define XrdCryptoDefRSAExp   0x10001

Definition at line 54 of file XrdCryptoAux.hh.

Referenced by XrdCryptosslRSA::XrdCryptosslRSA().

◆ XrdCryptoMinRSABits

#define XrdCryptoMinRSABits   2048

Definition at line 52 of file XrdCryptoAux.hh.

Referenced by XrdCryptosslRSA::XrdCryptosslRSA().

Typedef Documentation

◆ XrdCryptoKDFun_t

typedef int(* XrdCryptoKDFun_t) (const char *pass, int plen, const char *salt, int slen, char *key, int klen)

Definition at line 60 of file XrdCryptoAux.hh.

◆ XrdCryptoKDFunLen_t

typedef int(* XrdCryptoKDFunLen_t) ()

Definition at line 59 of file XrdCryptoAux.hh.

Function Documentation

◆ XrdCryptoKDFun()

int XrdCryptoKDFun ( const char * pass,
int plen,
const char * salt,
int slen,
char * key,
int klen )

◆ XrdCryptoKDFunLen()

int XrdCryptoKDFunLen ( )

◆ 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
55 eDest.logger(&Logger);
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
static XrdSysError eDest(0,"crypto_")
#define cryptoTRACE_Notify
#define cryptoTRACE_Dump
#define cryptoTRACE_Debug
#define cryptoTRACE_ALL

References cryptoTrace, cryptoTRACE_ALL, cryptoTRACE_Debug, cryptoTRACE_Dump, cryptoTRACE_Notify, eDest, and Logger.

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

+ 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, and TZInitialized.

Referenced by Display(), and XrdCryptosslASN1toUTC().

+ Here is the caller graph for this function:

Variable Documentation

◆ XrdCryptoDSTShift

const time_t XrdCryptoDSTShift = 3600

Definition at line 86 of file XrdCryptoAux.hh.