xrootd
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
XrdSecProtocolgsi Class Reference

#include <XrdSecProtocolgsi.hh>

Inheritance diagram for XrdSecProtocolgsi:
Inheritance graph
[legend]
Collaboration diagram for XrdSecProtocolgsi:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int Authenticate (XrdSecCredentials *cred, XrdSecParameters **parms, XrdOucErrInfo *einfo=0)
XrdSecCredentials * getCredentials (XrdSecParameters *parm=0, XrdOucErrInfo *einfo=0)
 XrdSecProtocolgsi (int opts, const char *hname, const struct sockaddr *ipadd, const char *parms=0)
virtual ~XrdSecProtocolgsi ()
void Delete ()
 Delete the protocol object. DO NOT use C++ delete() on this object.
int Encrypt (const char *inbuf, int inlen, XrdSecBuffer **outbuf)
int Decrypt (const char *inbuf, int inlen, XrdSecBuffer **outbuf)
int Sign (const char *inbuf, int inlen, XrdSecBuffer **outbuf)
int Verify (const char *inbuf, int inlen, const char *sigbuf, int siglen)
int getKey (char *kbuf=0, int klen=0)
int setKey (char *kbuf, int klen)

Static Public Member Functions

static char * Init (gsiOptions o, XrdOucErrInfo *erp)
static XrdOucTrace * EnableTracing ()

Private Member Functions

int ParseClientInput (XrdSutBuffer *br, XrdSutBuffer **bm, String &emsg)
int ClientDoInit (XrdSutBuffer *br, XrdSutBuffer **bm, String &cmsg)
int ClientDoCert (XrdSutBuffer *br, XrdSutBuffer **bm, String &cmsg)
int ClientDoPxyreq (XrdSutBuffer *br, XrdSutBuffer **bm, String &cmsg)
int ParseServerInput (XrdSutBuffer *br, XrdSutBuffer **bm, String &cmsg)
int ServerDoCertreq (XrdSutBuffer *br, XrdSutBuffer **bm, String &cmsg)
int ServerDoCert (XrdSutBuffer *br, XrdSutBuffer **bm, String &cmsg)
int ServerDoSigpxy (XrdSutBuffer *br, XrdSutBuffer **bm, String &cmsg)
int ParseCrypto (String cryptlist)
int ParseCAlist (String calist)
bool ServerCertNameOK (const char *subject, String &e)
XrdSecCredentials * ErrC (XrdOucErrInfo *einfo, XrdSutBuffer *b1, XrdSutBuffer *b2, XrdSutBuffer *b3, kXR_int32 ecode, const char *msg1=0, const char *msg2=0, const char *msg3=0)
int ErrS (String ID, XrdOucErrInfo *einfo, XrdSutBuffer *b1, XrdSutBuffer *b2, XrdSutBuffer *b3, kXR_int32 ecode, const char *msg1=0, const char *msg2=0, const char *msg3=0)
bool CheckTimeStamp (XrdSutBuffer *b, int skew, String &emsg)
bool CheckRtag (XrdSutBuffer *bm, String &emsg)
int AddSerialized (char opt, kXR_int32 step, String ID, XrdSutBuffer *bls, XrdSutBuffer *buf, kXR_int32 type, XrdCryptoCipher *cip)
void CopyEntity (XrdSecEntity *in, XrdSecEntity *out, int *lout=0)
void FreeEntity (XrdSecEntity *in)
int ExtractVOMS (X509Chain *c, XrdSecEntity &ent)

Static Private Member Functions

static int GetCA (const char *cahash, XrdCryptoFactory *cryptof, gsiHSVars *hs=0)
static String GetCApath (const char *cahash)
static bool VerifyCA (int opt, X509Chain *cca, XrdCryptoFactory *cf)
static XrdSutPFEntry * GetSrvCertEnt (XrdSutCacheRef &pfeRef, XrdCryptoFactory *cf, time_t timestamp, String &cal)
static XrdCryptoX509Crl * LoadCRL (XrdCryptoX509 *xca, const char *sjhash, XrdCryptoFactory *CF, int dwld)
static int QueryProxy (bool checkcache, XrdSutCache *cache, const char *tag, XrdCryptoFactory *cf, time_t timestamp, ProxyIn_t *pi, ProxyOut_t *po)
static int InitProxy (ProxyIn_t *pi, X509Chain *ch=0, XrdCryptoRSA **key=0)
static void ErrF (XrdOucErrInfo *einfo, kXR_int32 ecode, const char *msg1, const char *msg2=0, const char *msg3=0)
static int LoadGMAP (int now)
static XrdSecgsiGMAP_t LoadGMAPFun (const char *plugin, const char *parms)
static XrdSecgsiAuthz_t LoadAuthzFun (const char *plugin, const char *parms, int &fmt)
static XrdSecgsiVOMS_t LoadVOMSFun (const char *plugin, const char *parms, int &fmt)
static void QueryGMAP (XrdCryptoX509Chain *chain, int now, String &name)

Private Attributes

int options
struct sockaddr hostaddr
XrdCryptoFactory * sessionCF
XrdCryptoCipher * sessionKey
XrdSutBucket * bucketKey
XrdCryptoMsgDigest * sessionMD
XrdCryptoRSA * sessionKsig
XrdCryptoRSA * sessionKver
X509Chain * proxyChain
bool srvMode
gsiHSVars * hs

Static Private Attributes

static XrdSysMutex gsiContext
static String CAdir = "/etc/grid-security/certificates/"
static String CRLdir = "/etc/grid-security/certificates/"
static String DefCRLext = ".r0"
static String SrvCert = "/etc/grid-security/xrd/xrdcert.pem"
static String SrvKey = "/etc/grid-security/xrd/xrdkey.pem"
static String UsrProxy
static String UsrCert = "/.globus/usercert.pem"
static String UsrKey = "/.globus/userkey.pem"
static String PxyValid = "12:00"
static int DepLength = 0
static int DefBits = 512
static int CACheck = 1
static int CRLCheck = 1
static int CRLDownload = 0
static int CRLRefresh = 86400
static String DefCrypto = "ssl"
static String DefCipher = "aes-128-cbc:bf-cbc:des-ede3-cbc"
static String DefMD = "sha1:md5"
static String DefError = "invalid credentials "
static String GMAPFile = "/etc/grid-security/grid-mapfile"
static int GMAPOpt = 1
static bool GMAPuseDNname = 0
static int GMAPCacheTimeOut = -1
static XrdSysPlugin * GMAPPlugin = 0
static XrdSecgsiGMAP_t GMAPFun = 0
static XrdSysPlugin * AuthzPlugin = 0
static XrdSecgsiAuthz_t AuthzFun = 0
static XrdSecgsiAuthzKey_t AuthzKey = 0
static int AuthzCertFmt = -1
static int AuthzCacheTimeOut = 43200
static int PxyReqOpts = 0
static int AuthzPxyWhat = -1
static int AuthzPxyWhere = -1
static String SrvAllowedNames
static int VOMSAttrOpt = 1
static XrdSysPlugin * VOMSPlugin = 0
static XrdSecgsiVOMS_t VOMSFun = 0
static int VOMSCertFmt = -1
static int MonInfoOpt = 0
static bool HashCompatibility = 1
static int ncrypt = 0
static XrdCryptoFactory * cryptF [XrdCryptoMax] = {0}
static int cryptID [XrdCryptoMax] = {0}
static String cryptName [XrdCryptoMax] = {0}
static XrdCryptoCipher * refcip [XrdCryptoMax] = {0}
static XrdSutCache cacheCA
static XrdSutCache cacheCert
static XrdSutCache cachePxy
static XrdSutCache cacheGMAP
static XrdSutCache cacheGMAPFun
static XrdSutCache cacheAuthzFun
static GSICrlStack stackCRL
static time_t lastGMAPCheck = -1
static XrdSysMutex mutexGMAP
static int Debug = 0
static bool Server = 1
static int TimeSkew = 300
static XrdSysLogger Logger
static XrdSysError eDest
static XrdOucTrace * GSITrace = 0

Friends

class gsiOptions
class gsiHSVars

Constructor & Destructor Documentation

XrdSecProtocolgsi::XrdSecProtocolgsi ( int  opts,
const char *  hname,
const struct sockaddr *  ipadd,
const char *  parms = 0 
)
virtual XrdSecProtocolgsi::~XrdSecProtocolgsi ( ) [inline, virtual]

Member Function Documentation

int XrdSecProtocolgsi::AddSerialized ( char  opt,
kXR_int32  step,
String  ID,
XrdSutBuffer *  bls,
XrdSutBuffer *  buf,
kXR_int32  type,
XrdCryptoCipher *  cip 
) [private]
int XrdSecProtocolgsi::Authenticate ( XrdSecCredentials *  cred,
XrdSecParameters **  parms,
XrdOucErrInfo *  einfo = 0 
) [virtual]

Authenticate a client.

Parameters:
credCredentials supplied by the client.
parmsPlace where the address of additional authentication data is to be placed for another autrhentication handshake.
einfoThe error information object where error messages should be placed. The messages are returned to the client. Should einfo be null, messages should be written to stderr.
Returns:
> 0 -> parms present (more authentication needed) = 0 -> Entity present (authentication suceeded) < 0 -> einfo present (error has occured)

Implements XrdSecProtocol.

References XrdSutCache::Add(), XrdSutBuffer::AddBucket(), AddSerialized(), AuthzCacheTimeOut, AuthzCertFmt, AuthzFun, AuthzKey, AuthzPxyWhat, AuthzPxyWhere, XrdSutPFBuf::buf, XrdSutPFEntry::buf1, XrdSutPFEntry::buf2, XrdSecBuffer::buffer, XrdOucString::c_str(), cacheAuthzFun, gsiHSVars::Cbck, gsiHSVars::Chain, CheckRtag(), ClientStepStr(), XrdSutPFEntry::cnt, CopyEntity(), XrdSecEntity::creds, XrdSecEntity::credslen, CryptList, XrdSutBuffer::Deactivate(), DEBUG, DefCipher, DefMD, XrdSutBuffer::Dump(), XrdCryptoX509Chain::EEChash(), XrdCryptoX509Chain::EECname(), XrdCryptoX509Chain::End(), XrdSecEntity::endorsements, XrdSecProtocol::Entity, EPNAME, XrdOucString::erase(), ErrS(), XrdCryptoX509::Export(), ExtractVOMS(), XrdOucString::find(), FreeEntity(), XrdSutCache::Get(), XrdSutBuffer::GetBucket(), XrdSutBuffer::GetProtocol(), XrdSutBuffer::GetStep(), GMAPOpt, GMAPuseDNname, XrdSecEntity::grps, hs, gsiHSVars::ID, kGSErrAddBucket, kGSErrBadOpt, kGSErrBadProtocol, kGSErrBadRndmTag, kGSErrDecodeBuffer, kGSErrError, kGSErrNoPublic, kGSErrParseBuffer, kGSErrSerialBuffer, kgST_error, kgST_more, kgST_ok, kPFE_disabled, kPFE_ok, kXGC_cert, kXGC_certreq, kXGC_sigpxy, kXGS_cert, kXGS_none, kXGS_pxyreq, kXRS_cipher_alg, kXRS_main, kXRS_md_alg, kXRS_message, kXRS_puk, kXRS_user, XrdSutPFBuf::len, XrdOucString::length(), XrdSecEntity::moninfo, MonInfoOpt, XrdSutPFEntry::mtime, XrdSecEntity::name, XrdCryptoX509::NotAfter(), NOTIFY, gsiHSVars::Options, ParseServerInput(), PRINT, XrdSecEntity::prot, XrdCryptoCipher::Public(), gsiHSVars::PxyChain, QTRACE, QueryGMAP(), gsiHSVars::Rcip, XrdSutCache::Rehash(), REL2, XrdSutCache::Remove(), gsiHSVars::RemVers, XrdOucString::replace(), XrdSecEntity::role, SafeDelArray, SafeDelete, SafeFree, XrdSutBuffer::Serialized(), ServerStepStr(), sessionKey, XrdSecBuffer::size, XrdSutPFEntry::status, STR_NPOS, XrdSecEntity::tident, gsiHSVars::TimeStamp, XrdOucString::tokenize(), XrdSutBucket::ToString(), XrdSutCacheRef::UnLock(), VOMSAttrOpt, VOMSCertFmt, VOMSFun, XrdSecEntity::vorg, XrdCryptosslX509ExportChain(), XrdSecPROTOIDENT, XrdSecPROTOIDLEN, and XrdSutBuckStr().

bool XrdSecProtocolgsi::CheckRtag ( XrdSutBuffer *  bm,
String &  emsg 
) [private]
bool XrdSecProtocolgsi::CheckTimeStamp ( XrdSutBuffer *  b,
int  skew,
String &  emsg 
) [private]
int XrdSecProtocolgsi::ClientDoCert ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  cmsg 
) [private]
int XrdSecProtocolgsi::ClientDoInit ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  cmsg 
) [private]
int XrdSecProtocolgsi::ClientDoPxyreq ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  cmsg 
) [private]
void XrdSecProtocolgsi::CopyEntity ( XrdSecEntity *  in,
XrdSecEntity *  out,
int *  lout = 0 
) [private]
int XrdSecProtocolgsi::Decrypt ( const char *  ,
int  ,
XrdSecBuffer **   
) [virtual]

Decrypt data in inbuff using the session key.

Parameters:
inbuffbuffer holding data to be decrypted.
inlenlength of the data.
outbuffplace where a pointer to the decrypted data is placed.
Returns:
< 0 Failed,the return value is -errno (see Encrypt). = 0 Success, outbuff contains a pointer to the decrypted data. The caller is responsible for deleting the returned object.

Reimplemented from XrdSecProtocol.

References DEBUG, XrdCryptoCipher::DecOutLength(), XrdCryptoCipher::Decrypt(), EPNAME, SafeFree, and sessionKey.

void XrdSecProtocolgsi::Delete ( ) [virtual]
int XrdSecProtocolgsi::Encrypt ( const char *  ,
int  ,
XrdSecBuffer **   
) [virtual]

Encrypt data in inbuff using the session key.

Parameters:
inbuffbuffer holding data to be encrypted.
inlenlength of the data.
outbuffplace where a pointer to the encrypted data is placed.
Returns:
< 0 Failed, the return value is -errno of the reason. Typically, -EINVAL - one or more arguments are invalid. -NOTSUP - encryption not supported by the protocol -ENOENT - Context not innitialized = 0 Success, outbuff contains a pointer to the encrypted data. The caller is responsible for deleting the returned object.

Reimplemented from XrdSecProtocol.

References DEBUG, XrdCryptoCipher::EncOutLength(), XrdCryptoCipher::Encrypt(), EPNAME, SafeFree, and sessionKey.

XrdSecCredentials * XrdSecProtocolgsi::ErrC ( XrdOucErrInfo *  einfo,
XrdSutBuffer *  b1,
XrdSutBuffer *  b2,
XrdSutBuffer *  b3,
kXR_int32  ecode,
const char *  msg1 = 0,
const char *  msg2 = 0,
const char *  msg3 = 0 
) [private]

References ErrF(), and REL3.

Referenced by getCredentials().

void XrdSecProtocolgsi::ErrF ( XrdOucErrInfo *  einfo,
kXR_int32  ecode,
const char *  msg1,
const char *  msg2 = 0,
const char *  msg3 = 0 
) [static, private]
int XrdSecProtocolgsi::ErrS ( String  ID,
XrdOucErrInfo *  einfo,
XrdSutBuffer *  b1,
XrdSutBuffer *  b2,
XrdSutBuffer *  b3,
kXR_int32  ecode,
const char *  msg1 = 0,
const char *  msg2 = 0,
const char *  msg3 = 0 
) [private]

References ErrF(), kgST_error, and REL3.

Referenced by Authenticate().

int XrdSecProtocolgsi::ExtractVOMS ( X509Chain *  c,
XrdSecEntity &  ent 
) [private]
void XrdSecProtocolgsi::FreeEntity ( XrdSecEntity *  in) [private]
int XrdSecProtocolgsi::GetCA ( const char *  cahash,
XrdCryptoFactory *  cryptof,
gsiHSVars *  hs = 0 
) [static, private]
String XrdSecProtocolgsi::GetCApath ( const char *  cahash) [static, private]

Generate client credentials to be used in the authentication process.

Parameters:
parmPointer to the information returned by the server either in the initial login response or the authmore response.
einfoThe error information object where error messages should be placed. The messages are returned to the client. Should einfo be null, messages should be written to stderr.
Returns:
Success: Pointer to credentials to sent to the server. The caller is responsible for deleting the object. Failure: Null pointer with einfo, if supplied, containing the reason for the failure.

Implements XrdSecProtocol.

References XrdSutBuffer::AddBucket(), AddSerialized(), XrdCryptoX509Chain::Begin(), XrdSutBucket::buffer, XrdSecBuffer::buffer, XrdOucString::c_str(), gsiHSVars::Cbck, CheckRtag(), ClientStepStr(), CryptList, gsiHSVars::CryptoMod, DEBUG, XrdSutBuffer::Dump(), XrdSecProtocol::Entity, EPNAME, ErrC(), XrdSutBuffer::GetProtocol(), XrdSutBuffer::GetStep(), HashCompatibility, hs, gsiHSVars::ID, XrdCryptoX509::IssuerHash(), gsiHSVars::Iter, XrdCryptoX509::kCA, kGSErrAddBucket, kGSErrBadOpt, kGSErrBadProtocol, kGSErrBadRndmTag, kGSErrCreateBucket, kGSErrDecodeBuffer, kGSErrError, kGSErrNoBuffer, kGSErrNoCipher, kGSErrNoPublic, kGSErrParseBuffer, kGSErrSerialBuffer, kXGC_cert, kXGC_certreq, kXGC_none, kXGC_sigpxy, kXGS_cert, kXGS_init, kXGS_pxyreq, kXRS_clnt_opts, kXRS_cryptomod, kXRS_issuer_hash, kXRS_main, kXRS_message, kXRS_puk, kXRS_user, kXRS_version, XrdOucString::length(), XrdSutBuffer::MarshalBucket(), XrdSecEntity::name, XrdCryptoX509Chain::Next(), NOTIFY, gsiHSVars::Options, gsiHSVars::Parms, ParseClientInput(), proxyChain, XrdCryptoCipher::Public(), gsiHSVars::PxyChain, QTRACE, REL2, gsiHSVars::RemVers, XrdOucString::replace(), XrdSutBuffer::Serialized(), ServerStepStr(), sessionCF, sessionKey, XrdSutBuffer::SetStep(), XrdSutBucket::size, XrdSecBuffer::size, srvMode, XrdCryptoX509::SubjectHash(), gsiHSVars::TimeStamp, XrdCryptoX509::type, XrdSutBuffer::UpdateBucket(), Version, XrdCryptoFactory::X509ExportChain(), XrdSecPROTOIDENT, and XrdSutBuckStr().

int XrdSecProtocolgsi::getKey ( char *  = 0,
int  = 0 
) [virtual]

Get the current encryption key (i.e. session key)

Parameters:
buffbuffer to hold the key, and may be null.
sizesize of the buffer.
Returns:
< 0 Failed, returned value if -errno (see Encrypt) >= 0 The size of the encyption key. The supplied buffer of length size hold the key. If the buffer address is supplied, the key is placed in the buffer.

Reimplemented from XrdSecProtocol.

References XrdCryptoCipher::AsBucket(), bucketKey, XrdSutBucket::buffer, DEBUG, EPNAME, sessionKey, and XrdSutBucket::size.

XrdSutPFEntry * XrdSecProtocolgsi::GetSrvCertEnt ( XrdSutCacheRef &  pfeRef,
XrdCryptoFactory *  cf,
time_t  timestamp,
String &  cal 
) [static, private]
char * XrdSecProtocolgsi::Init ( gsiOptions  o,
XrdOucErrInfo *  erp 
) [static]

References access(), AuthzCacheTimeOut, AuthzCertFmt, gsiOptions::authzfun, AuthzFun, gsiOptions::authzfunparms, gsiOptions::authzpxy, AuthzPxyWhat, AuthzPxyWhere, gsiOptions::authzto, gsiOptions::bits, XrdOucString::c_str(), gsiOptions::ca, cacheAuthzFun, cacheCA, cacheCert, CACheck, cacheGMAP, cacheGMAPFun, cachePxy, CAdir, gsiOptions::cert, gsiOptions::certdir, XrdCryptoFactory::Cipher(), gsiOptions::cipher, gsiOptions::clist, gsiOptions::crl, CRLCheck, gsiOptions::crldir, CRLdir, CRLDownload, gsiOptions::crlext, gsiOptions::crlrefresh, CRLRefresh, cryptF, cryptID, cryptName, cryptoTRACE_Debug, cryptoTRACE_Dump, cryptoTRACE_Notify, DEBUG, gsiOptions::debug, Debug, DefBits, DefCipher, DefCRLext, DefCrypto, DefMD, gsiOptions::deplen, DepLength, gsiOptions::dlgpxy, XrdSutCache::Dump(), XrdSutCache::Empty(), XrdOucString::endswith(), EPNAME, XrdOucString::erase(), ErrF(), gsiOptions::exppxy, XrdCryptoFactory::GetCryptoFactory(), XrdOucErrInfo::getErrText(), GetSrvCertEnt(), GMAPCacheTimeOut, GMAPFile, gsiOptions::gmapfun, GMAPFun, gsiOptions::gmapfunparms, GMAPOpt, gsiOptions::gmapto, GMAPuseDNname, gsiOptions::gridmap, GSITrace, gUsrPxyDef, gsiOptions::hashcomp, HashCompatibility, XrdCryptoFactory::ID(), XrdSutCache::Init(), XrdOucString::insert(), gsiOptions::key, kGSErrError, kGSErrInit, kOptsDlgPxy, kOptsFwdPxy, kOptsPxFile, kOptsSigReq, kOptsSrvReq, XrdOucString::length(), LoadAuthzFun(), LoadGMAP(), LoadGMAPFun(), LoadVOMSFun(), gsiOptions::md, gsiOptions::mode, gsiOptions::moninfo, MonInfoOpt, XrdCryptoFactory::Name(), ncrypt, NOTIFY, XrdCryptoFactory::Notify(), gsiOptions::ogmap, PRINT, gsiOptions::proxy, PxyReqOpts, PxyValid, QTRACE, refcip, XrdSutCache::Rehash(), XrdSutCache::Reset(), Server, XrdCryptoFactory::SetTrace(), gsiOptions::sigpxy, SrvAllowedNames, SrvCert, SrvKey, gsiOptions::srvnames, stat(), sutTRACE_Debug, sutTRACE_Dump, sutTRACE_Notify, XrdOucString::tokenize(), TRACE, TRACE_ALL, TRACE_Authen, TRACE_Debug, XrdSutCacheRef::UnLock(), UsrCert, UsrKey, UsrProxy, gsiOptions::valid, Version, gsiOptions::vomsat, VOMSAttrOpt, VOMSCertFmt, gsiOptions::vomsfun, VOMSFun, gsiOptions::vomsfunparms, XrdOucTrace::What, XrdCryptoMax, XrdCryptoSetTrace(), XrdSutExpand(), XrdSutHome(), and XrdSutSetTrace().

Referenced by XrdSecProtocolgsiInit().

int XrdSecProtocolgsi::InitProxy ( ProxyIn_t *  pi,
X509Chain *  ch = 0,
XrdCryptoRSA **  key = 0 
) [static, private]
XrdSecgsiAuthz_t XrdSecProtocolgsi::LoadAuthzFun ( const char *  plugin,
const char *  parms,
int &  fmt 
) [static, private]
XrdCryptoX509Crl * XrdSecProtocolgsi::LoadCRL ( XrdCryptoX509 *  xca,
const char *  sjhash,
XrdCryptoFactory *  CF,
int  dwld 
) [static, private]
int XrdSecProtocolgsi::LoadGMAP ( int  now) [static, private]
XrdSecgsiGMAP_t XrdSecProtocolgsi::LoadGMAPFun ( const char *  plugin,
const char *  parms 
) [static, private]
XrdSecgsiVOMS_t XrdSecProtocolgsi::LoadVOMSFun ( const char *  plugin,
const char *  parms,
int &  fmt 
) [static, private]
int XrdSecProtocolgsi::ParseCAlist ( String  calist) [private]
int XrdSecProtocolgsi::ParseClientInput ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  emsg 
) [private]
int XrdSecProtocolgsi::ParseCrypto ( String  cryptlist) [private]
int XrdSecProtocolgsi::ParseServerInput ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  cmsg 
) [private]
void XrdSecProtocolgsi::QueryGMAP ( XrdCryptoX509Chain *  chain,
int  now,
String &  name 
) [static, private]
int XrdSecProtocolgsi::QueryProxy ( bool  checkcache,
XrdSutCache *  cache,
const char *  tag,
XrdCryptoFactory *  cf,
time_t  timestamp,
ProxyIn_t *  pi,
ProxyOut_t *  po 
) [static, private]
bool XrdSecProtocolgsi::ServerCertNameOK ( const char *  subject,
String &  e 
) [private]
int XrdSecProtocolgsi::ServerDoCert ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  cmsg 
) [private]
int XrdSecProtocolgsi::ServerDoCertreq ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  cmsg 
) [private]
int XrdSecProtocolgsi::ServerDoSigpxy ( XrdSutBuffer *  br,
XrdSutBuffer **  bm,
String &  cmsg 
) [private]
int XrdSecProtocolgsi::setKey ( char *  ,
int   
) [virtual]

Set the current encryption key

Parameters:
buffbuffer that holds the key.
sizesize of the key.
Returns:
: < 0 Failed, returned value if -errno (see Encrypt) = 0 The new key has been set.

Reimplemented from XrdSecProtocol.

References XrdCryptoFactory::Cipher(), DEBUG, EPNAME, SafeDelete, sessionCF, sessionKey, and XrdSutBucket::SetBuf().

int XrdSecProtocolgsi::Sign ( const char *  ,
int  ,
XrdSecBuffer **   
) [virtual]

Sign data in inbuff using the session key.

Parameters:
inbuffbuffer holding data to be signed.
inlenlength of the data.
outbuffplace where a pointer to the signature is placed.
Returns:
< 0 Failed,the return value is -errno (see Encrypt). = 0 Success, outbuff contains a pointer to the signature. The caller is responsible for deleting the returned object.

Reimplemented from XrdSecProtocol.

References XrdCryptoBasic::Buffer(), DEBUG, XrdCryptoRSA::EncryptPrivate(), EPNAME, XrdCryptoMsgDigest::Final(), XrdCryptoRSA::GetOutlen(), XrdCryptoBasic::Length(), XrdCryptoMsgDigest::Reset(), SafeFree, sessionKsig, sessionMD, and XrdCryptoMsgDigest::Update().

int XrdSecProtocolgsi::Verify ( const char *  ,
int  ,
const char *  ,
int   
) [virtual]

Verify a signature using the session key.

Parameters:
inbuffbuffer holding data to be verified.
inlenlength of the data.
sigbuffpointer to the signature data.
siglenlength of the signature data.
Returns:
< 0 Failed,the return value is -errno (see Encrypt). = 0 Success, signature is correct. > 0 Failed to verify, signature does not match inbuff data.

Reimplemented from XrdSecProtocol.

References XrdCryptoBasic::Buffer(), DEBUG, XrdCryptoRSA::DecryptPublic(), EPNAME, XrdCryptoMsgDigest::Final(), XrdCryptoRSA::GetOutlen(), XrdCryptoBasic::Length(), XrdCryptoMsgDigest::Reset(), sessionKver, sessionMD, and XrdCryptoMsgDigest::Update().

bool XrdSecProtocolgsi::VerifyCA ( int  opt,
X509Chain *  cca,
XrdCryptoFactory *  cf 
) [static, private]

Friends And Related Function Documentation

friend class gsiHSVars [friend]

Referenced by XrdSecProtocolgsi().

friend class gsiOptions [friend]

Member Data Documentation

int XrdSecProtocolgsi::AuthzCacheTimeOut = 43200 [static, private]

Referenced by Authenticate(), and Init().

int XrdSecProtocolgsi::AuthzCertFmt = -1 [static, private]

Referenced by Authenticate(), and Init().

Referenced by Authenticate(), and Init().

Referenced by Authenticate(), and LoadAuthzFun().

Referenced by LoadAuthzFun().

int XrdSecProtocolgsi::AuthzPxyWhat = -1 [static, private]

Referenced by Authenticate(), and Init().

int XrdSecProtocolgsi::AuthzPxyWhere = -1 [static, private]

Referenced by Authenticate(), and Init().

Referenced by Delete(), getKey(), and XrdSecProtocolgsi().

Referenced by Authenticate(), and Init().

Referenced by GetCA(), and Init().

Referenced by GetSrvCertEnt(), and Init().

int XrdSecProtocolgsi::CACheck = 1 [static, private]

Referenced by GetCA(), Init(), QueryProxy(), and VerifyCA().

Referenced by Init(), LoadGMAP(), and QueryGMAP().

Referenced by Init(), and QueryGMAP().

Referenced by ClientDoInit(), and Init().

String XrdSecProtocolgsi::CAdir = "/etc/grid-security/certificates/" [static, private]
int XrdSecProtocolgsi::CRLCheck = 1 [static, private]

Referenced by GetCA(), Init(), and LoadCRL().

String XrdSecProtocolgsi::CRLdir = "/etc/grid-security/certificates/" [static, private]

Referenced by Init(), and LoadCRL().

int XrdSecProtocolgsi::CRLDownload = 0 [static, private]

Referenced by GetCA(), and Init().

int XrdSecProtocolgsi::CRLRefresh = 86400 [static, private]

Referenced by GetCA(), and Init().

XrdCryptoFactory * XrdSecProtocolgsi::cryptF = {0} [static, private]

Referenced by Init(), and ParseCrypto().

int XrdSecProtocolgsi::cryptID = {0} [static, private]

Referenced by Init(), and ParseCrypto().

String XrdSecProtocolgsi::cryptName = {0} [static, private]

Referenced by Init().

int XrdSecProtocolgsi::Debug = 0 [static, private]

Referenced by ErrF(), Init(), and ParseCrypto().

int XrdSecProtocolgsi::DefBits = 512 [static, private]

Referenced by ClientDoInit(), and Init().

String XrdSecProtocolgsi::DefCipher = "aes-128-cbc:bf-cbc:des-ede3-cbc" [static, private]

Referenced by Authenticate(), Init(), and ServerDoCert().

String XrdSecProtocolgsi::DefCRLext = ".r0" [static, private]

Referenced by Init(), and LoadCRL().

String XrdSecProtocolgsi::DefCrypto = "ssl" [static, private]

Referenced by ClientDoInit(), and Init().

String XrdSecProtocolgsi::DefError = "invalid credentials " [static, private]
String XrdSecProtocolgsi::DefMD = "sha1:md5" [static, private]

Referenced by Authenticate(), Init(), and ServerDoCert().

int XrdSecProtocolgsi::DepLength = 0 [static, private]

Referenced by ClientDoInit(), and Init().

int XrdSecProtocolgsi::GMAPCacheTimeOut = -1 [static, private]

Referenced by Init(), and QueryGMAP().

String XrdSecProtocolgsi::GMAPFile = "/etc/grid-security/grid-mapfile" [static, private]

Referenced by Init(), and LoadGMAP().

Referenced by Init(), and QueryGMAP().

int XrdSecProtocolgsi::GMAPOpt = 1 [static, private]

Referenced by Authenticate(), and Init().

Referenced by LoadGMAPFun().

bool XrdSecProtocolgsi::GMAPuseDNname = 0 [static, private]

Referenced by Authenticate(), and Init().

XrdOucTrace * XrdSecProtocolgsi::GSITrace = 0 [static, private]

Referenced by EnableTracing(), Init(), and ParseCrypto().

bool XrdSecProtocolgsi::HashCompatibility = 1 [static, private]

Referenced by getCredentials(), GetSrvCertEnt(), and Init().

struct sockaddr XrdSecProtocolgsi::hostaddr [private]

Referenced by XrdSecProtocolgsi().

time_t XrdSecProtocolgsi::lastGMAPCheck = -1 [static, private]

Referenced by LoadGMAP().

Referenced by EnableTracing().

int XrdSecProtocolgsi::MonInfoOpt = 0 [static, private]

Referenced by Authenticate(), and Init().

Referenced by LoadGMAP().

int XrdSecProtocolgsi::ncrypt = 0 [static, private]

Referenced by Init(), and ParseCrypto().

Referenced by XrdSecProtocolgsi().

int XrdSecProtocolgsi::PxyReqOpts = 0 [static, private]
String XrdSecProtocolgsi::PxyValid = "12:00" [static, private]

Referenced by ClientDoInit(), GetSrvCertEnt(), and Init().

XrdCryptoCipher * XrdSecProtocolgsi::refcip = {0} [static, private]

Referenced by Init(), and ParseCrypto().

bool XrdSecProtocolgsi::Server = 1 [static, private]

Referenced by Init(), and XrdSecProtocolgsi().

Referenced by Init(), and ServerCertNameOK().

String XrdSecProtocolgsi::SrvCert = "/etc/grid-security/xrd/xrdcert.pem" [static, private]

Referenced by GetSrvCertEnt(), and Init().

String XrdSecProtocolgsi::SrvKey = "/etc/grid-security/xrd/xrdkey.pem" [static, private]

Referenced by GetSrvCertEnt(), and Init().

Referenced by GetCA(), and gsiHSVars::~gsiHSVars().

int XrdSecProtocolgsi::TimeSkew = 300 [static, private]

Referenced by ClientDoCert(), and ServerDoCert().

String XrdSecProtocolgsi::UsrCert = "/.globus/usercert.pem" [static, private]

Referenced by ClientDoInit(), and Init().

String XrdSecProtocolgsi::UsrKey = "/.globus/userkey.pem" [static, private]

Referenced by ClientDoInit(), and Init().

int XrdSecProtocolgsi::VOMSAttrOpt = 1 [static, private]

Referenced by Authenticate(), and Init().

int XrdSecProtocolgsi::VOMSCertFmt = -1 [static, private]

Referenced by Authenticate(), and Init().

Referenced by Authenticate(), and Init().

Referenced by LoadVOMSFun().


The documentation for this class was generated from the following files: