#include <XrdSecProtocolgsi.hh>
|
int | Authenticate (XrdSecCredentials *cred, XrdSecParameters **parms, XrdOucErrInfo *einfo=0) |
|
XrdSecCredentials * | getCredentials (XrdSecParameters *parm=0, XrdOucErrInfo *einfo=0) |
|
| XrdSecProtocolgsi (int opts, const char *hname, XrdNetAddrInfo &endPoint, const char *parms=0) |
|
virtual | ~XrdSecProtocolgsi () |
|
void | Delete () |
| Delete the protocol object. DO NOT use C++ delete() on this object. More...
|
|
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) |
|
virtual bool | needTLS () |
| Check if this protocol requires TLS to properly function. More...
|
|
| XrdSecProtocol (const char *pName) |
| Constructor. More...
|
|
|
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, const char *hname, 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) |
|
|
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 int | VerifyCRL (XrdCryptoX509Crl *crl, XrdCryptoX509 *xca, XrdOucString crldir, XrdCryptoFactory *CF, int hashalg) |
|
static XrdSutCacheEntry * | GetSrvCertEnt (XrdSutCERef &gcref, XrdCryptoFactory *cf, time_t timestamp, String &cal) |
|
static XrdCryptoX509Crl * | LoadCRL (XrdCryptoX509 *xca, const char *sjhash, XrdCryptoFactory *CF, int dwld, int &err) |
|
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, XrdCryptoFactory *cf, 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 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) |
|
XrdSecProtocolgsi::XrdSecProtocolgsi |
( |
int |
opts, |
|
|
const char * |
hname, |
|
|
XrdNetAddrInfo & |
endPoint, |
|
|
const char * |
parms = 0 |
|
) |
| |
virtual XrdSecProtocolgsi::~XrdSecProtocolgsi |
( |
| ) |
|
|
inlinevirtual |
Authenticate a client.
- Parameters
-
cred | Credentials supplied by the client. |
parms | Place where the address of additional authentication data is to be placed for another autrhentication handshake. |
einfo | The 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 occurred)
Implements XrdSecProtocol.
int XrdSecProtocolgsi::Decrypt |
( |
const char * |
inbuff, |
|
|
int |
inlen, |
|
|
XrdSecBuffer ** |
outbuff |
|
) |
| |
|
virtual |
Decrypt data in inbuff using the session key.
- Parameters
-
inbuff | buffer holding data to be decrypted. |
inlen | length of the data. |
outbuff | place 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.
void XrdSecProtocolgsi::Delete |
( |
| ) |
|
|
virtual |
Delete the protocol object. DO NOT use C++ delete() on this object.
Implements XrdSecProtocol.
static XrdOucTrace* XrdSecProtocolgsi::EnableTracing |
( |
| ) |
|
|
static |
int XrdSecProtocolgsi::Encrypt |
( |
const char * |
inbuff, |
|
|
int |
inlen, |
|
|
XrdSecBuffer ** |
outbuff |
|
) |
| |
|
virtual |
Encrypt data in inbuff using the session key.
- Parameters
-
inbuff | buffer holding data to be encrypted. |
inlen | length of the data. |
outbuff | place 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.
static void XrdSecProtocolgsi::ErrF |
( |
XrdOucErrInfo * |
einfo, |
|
|
kXR_int32 |
ecode, |
|
|
const char * |
msg1, |
|
|
const char * |
msg2 = 0 , |
|
|
const char * |
msg3 = 0 |
|
) |
| |
|
staticprivate |
static String XrdSecProtocolgsi::GetCApath |
( |
const char * |
cahash | ) |
|
|
staticprivate |
Generate client credentials to be used in the authentication process.
- Parameters
-
parm | Pointer to the information returned by the server either in the initial login response or the authmore response. |
einfo | The 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.
int XrdSecProtocolgsi::getKey |
( |
char * |
buff = 0 , |
|
|
int |
size = 0 |
|
) |
| |
|
virtual |
Get the current encryption key (i.e. session key)
- Parameters
-
buff | buffer to hold the key, and may be null. |
size | size 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.
static XrdSecgsiAuthz_t XrdSecProtocolgsi::LoadAuthzFun |
( |
const char * |
plugin, |
|
|
const char * |
parms, |
|
|
int & |
fmt |
|
) |
| |
|
staticprivate |
static XrdSecgsiGMAP_t XrdSecProtocolgsi::LoadGMAPFun |
( |
const char * |
plugin, |
|
|
const char * |
parms |
|
) |
| |
|
staticprivate |
static XrdSecgsiVOMS_t XrdSecProtocolgsi::LoadVOMSFun |
( |
const char * |
plugin, |
|
|
const char * |
parms, |
|
|
int & |
fmt |
|
) |
| |
|
staticprivate |
int XrdSecProtocolgsi::ParseCAlist |
( |
String |
calist | ) |
|
|
private |
int XrdSecProtocolgsi::ParseCrypto |
( |
String |
cryptlist | ) |
|
|
private |
bool XrdSecProtocolgsi::ServerCertNameOK |
( |
const char * |
subject, |
|
|
const char * |
hname, |
|
|
String & |
e |
|
) |
| |
|
private |
int XrdSecProtocolgsi::setKey |
( |
char * |
buff, |
|
|
int |
size |
|
) |
| |
|
virtual |
Set the current encryption key
- Parameters
-
buff | buffer that holds the key. |
size | size of the key. |
- Returns
- : < 0 Failed, returned value if -errno (see Encrypt) = 0 The new key has been set.
Reimplemented from XrdSecProtocol.
int XrdSecProtocolgsi::Sign |
( |
const char * |
inbuff, |
|
|
int |
inlen, |
|
|
XrdSecBuffer ** |
outbuff |
|
) |
| |
|
virtual |
Sign data in inbuff using the session key.
- Parameters
-
inbuff | buffer holding data to be signed. |
inlen | length of the data. |
outbuff | place 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.
int XrdSecProtocolgsi::Verify |
( |
const char * |
inbuff, |
|
|
int |
inlen, |
|
|
const char * |
sigbuff, |
|
|
int |
siglen |
|
) |
| |
|
virtual |
Verify a signature using the session key.
- Parameters
-
inbuff | buffer holding data to be verified. |
inlen | length of the data. |
sigbuff | pointer to the signature data. |
siglen | length 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.
int XrdSecProtocolgsi::AuthzAlways |
|
staticprivate |
int XrdSecProtocolgsi::AuthzCacheTimeOut |
|
staticprivate |
int XrdSecProtocolgsi::AuthzCertFmt |
|
staticprivate |
int XrdSecProtocolgsi::AuthzPxyWhat |
|
staticprivate |
int XrdSecProtocolgsi::AuthzPxyWhere |
|
staticprivate |
int XrdSecProtocolgsi::CACheck |
|
staticprivate |
String XrdSecProtocolgsi::CAdir |
|
staticprivate |
int XrdSecProtocolgsi::CRLCheck |
|
staticprivate |
String XrdSecProtocolgsi::CRLdir |
|
staticprivate |
int XrdSecProtocolgsi::CRLDownload |
|
staticprivate |
int XrdSecProtocolgsi::CRLRefresh |
|
staticprivate |
int XrdSecProtocolgsi::Debug |
|
staticprivate |
int XrdSecProtocolgsi::DefBits |
|
staticprivate |
String XrdSecProtocolgsi::DefCipher |
|
staticprivate |
String XrdSecProtocolgsi::DefCRLext |
|
staticprivate |
String XrdSecProtocolgsi::DefCrypto |
|
staticprivate |
String XrdSecProtocolgsi::DefError |
|
staticprivate |
String XrdSecProtocolgsi::DefMD |
|
staticprivate |
int XrdSecProtocolgsi::DepLength |
|
staticprivate |
char* XrdSecProtocolgsi::expectedHost |
|
private |
int XrdSecProtocolgsi::GMAPCacheTimeOut |
|
staticprivate |
String XrdSecProtocolgsi::GMAPFile |
|
staticprivate |
int XrdSecProtocolgsi::GMAPOpt |
|
staticprivate |
bool XrdSecProtocolgsi::GMAPuseDNname |
|
staticprivate |
bool XrdSecProtocolgsi::HashCompatibility |
|
staticprivate |
time_t XrdSecProtocolgsi::lastGMAPCheck |
|
staticprivate |
int XrdSecProtocolgsi::MonInfoOpt |
|
staticprivate |
int XrdSecProtocolgsi::ncrypt |
|
staticprivate |
int XrdSecProtocolgsi::options |
|
private |
int XrdSecProtocolgsi::PxyReqOpts |
|
staticprivate |
String XrdSecProtocolgsi::PxyValid |
|
staticprivate |
bool XrdSecProtocolgsi::Server |
|
staticprivate |
String XrdSecProtocolgsi::SrvAllowedNames |
|
staticprivate |
String XrdSecProtocolgsi::SrvCert |
|
staticprivate |
String XrdSecProtocolgsi::SrvKey |
|
staticprivate |
bool XrdSecProtocolgsi::srvMode |
|
private |
int XrdSecProtocolgsi::TimeSkew |
|
staticprivate |
bool XrdSecProtocolgsi::TrustDNS |
|
staticprivate |
bool XrdSecProtocolgsi::useIV |
|
private |
String XrdSecProtocolgsi::UsrCert |
|
staticprivate |
String XrdSecProtocolgsi::UsrKey |
|
staticprivate |
String XrdSecProtocolgsi::UsrProxy |
|
staticprivate |
int XrdSecProtocolgsi::VOMSAttrOpt |
|
staticprivate |
int XrdSecProtocolgsi::VOMSCertFmt |
|
staticprivate |
The documentation for this class was generated from the following file: