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

Definition at line 48 of file XrdCryptoAux.hh.

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

## cryptoTRACE_Dump

#define cryptoTRACE_Dump 0x0004

Definition at line 47 of file XrdCryptoAux.hh.

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

## cryptoTRACE_Notify

#define cryptoTRACE_Notify 0x0001

Definition at line 49 of file XrdCryptoAux.hh.

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

## 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.

{
// Set trace flags according to 'trace'
//
// Initiate error logging and tracing
eDest.logger(&Logger);
if (!cryptoTrace)
cryptoTrace = new XrdOucTrace(&eDest);
if (cryptoTrace) {
// Set debug mask
cryptoTrace->What = 0;
// Low level only
if ((trace & cryptoTRACE_Notify))
cryptoTrace->What |= cryptoTRACE_Notify;
// Medium level
if ((trace & cryptoTRACE_Debug))
cryptoTrace->What |= (cryptoTRACE_Notify | cryptoTRACE_Debug);
// High level
if ((trace & cryptoTRACE_Dump))
cryptoTrace->What |= cryptoTRACE_ALL;
}
}
cryptoTrace
XrdOucTrace * cryptoTrace
Definition XrdCryptoAux.cc:39
Logger
static XrdSysLogger Logger
Definition XrdCryptoAux.cc:37
eDest
static XrdSysError eDest(0,"crypto_")
cryptoTRACE_Notify
#define cryptoTRACE_Notify
Definition XrdCryptoAux.hh:49
cryptoTRACE_Dump
#define cryptoTRACE_Dump
Definition XrdCryptoAux.hh:47
cryptoTRACE_Debug
#define cryptoTRACE_Debug
Definition XrdCryptoAux.hh:48
cryptoTRACE_ALL
#define cryptoTRACE_ALL
Definition XrdCryptoAux.hh:46
XrdOucTrace
Definition XrdOucTrace.hh:36

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.

{
// Time Zone correction (wrt UTC)
// Assumes no DST, the correction is not expected to change during the year
if (!TZInitialized) {
time_t now = time(0);
struct tm ltn, gtn;
if (localtime_r(&now, &ltn) != 0 && gmtime_r(&now, &gtn) != 0) {
TZCorr = time_t(difftime(mktime(&ltn), mktime(&gtn)));
TZInitialized = 1;
}
}
// Done
return TZCorr;
}
TZCorr
static time_t TZCorr
Definition XrdCryptoAux.cc:42
TZInitialized
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

## XrdCryptoDSTShift

const time_t XrdCryptoDSTShift = 3600

Definition at line 86 of file XrdCryptoAux.hh.