39 #include <sys/param.h>
40 #include <sys/types.h>
53 #define DEBUG(x) {if (DebugON) std::cerr <<"sec_Client: " <<x <<std::endl;}
91 static int DebugON = ((getenv(
"XrdSecDEBUG") &&
92 strcmp(getenv(
"XrdSecDEBUG"),
"0")) ? 1 : 0);
95 getenv(
"XrdSecPROXYCREDS") != 0);
96 const char *noperr =
"XrdSec: No authentication protocols are available.";
102 DEBUG(
"protocol request for host " <<hostname <<
" token='"
103 <<(parms.
size > 0 ? std::setw(parms.
size) : std::setw(1))
104 <<(parms.
size > 0 ? parms.
buffer :
"") <<
"'");
112 if (!(protp = PManager.
Get(hostname, endPoint, parms, einfo)))
113 {
if (einfo) einfo->
setErrInfo(ENOPROTOOPT, noperr);
114 else std::cerr <<noperr <<std::endl;
XrdSecProtocol * XrdSecGetProtocol(const char *hostname, XrdNetAddrInfo &endPoint, XrdSecParameters &parms, XrdOucErrInfo *einfo)
XrdSecBuffer XrdSecCredentials
int setErrInfo(int code, const char *emsg)
XrdSecProtocol * Get(const char *hname, XrdNetAddrInfo &endPoint, const char *pname, XrdOucErrInfo *erp)
int Authenticate(XrdSecCredentials *cred, XrdSecParameters **parms, XrdOucErrInfo *einfo=0)
void Delete()
Delete the protocol object. DO NOT use C++ delete() on this object.
XrdSecCredentials * getCredentials(XrdSecParameters *parm=0, XrdOucErrInfo *einfo=0)
Generic structure to pass security information back and forth.
char * buffer
Pointer to the buffer.
int size
Size of the buffer or length of data in the buffer.