32 #include "XrdVersion.hh"
83 return (getP ? -1 : 1);
93 int Load(
char *eBuff,
int eBlen,
94 const char *cfn,
const char *seclib,
100 const char *mySecLib =
"libXrdSec.so";
105 if (!seclib) seclib = mySecLib;
116 rc = Plug(piP, getP, &ep);
118 {
if (secP && !(*secP = (*ep)(
eDest->
logger(), cfn))) rc = 1;
119 if (!rc) {
delete piP;
return 0;}
125 eDest->
Say(
"Config ",
"Unable to create security framework via ", seclib);
135 int Load(
char *eBuff,
int eBlen,
140 const char *myProtLib =
"libXrdSecProt.so";
144 if (!protlib) protlib = myProtLib;
166 eDest->
Say(
"Config ",
"Unable to create protection framework via ",protlib);
183 rc = Load(eBuff, eBlen, 0, seclib, &getP);
184 if (!rc)
return getP;
188 if (!seclib) seclib =
"default";
191 snprintf(eBuff, eBlen,
192 "Unable to create security framework via %s; invalid path.",
195 snprintf(eBuff, eBlen,
196 "Unable to create security framework via %s", seclib);
209 unsigned int resplen)
221 if (resplen < minLen)
return -EINVAL;
224 if (vLen + minLen > resplen)
return -EINVAL;
239 std::cerr <<
"SecLoad: " <<eBuff <<
'\n' <<std::flush;
253 return (protP ? 1 : 0);
288 if (Load(0, 0, cfn, seclib, getP, &CIA,
eDest))
return 0;
#define kXR_ShortProtRespLen
ServerResponseReqs_Protocol secreq
static XrdSysError eDest(0,"crypto_")
XrdSecService *(* XrdSecGetServ_t)(XrdSysLogger *, const char *)
XrdSecProtocol *(* XrdSecGetProt_t)(const char *hostname, XrdNetAddrInfo &endPoint, XrdSecParameters §oken, XrdOucErrInfo *einfo)
Typedef to simplify the encoding of methods returning XrdSecProtocol.
XrdSecGetProt_t XrdSecLoadSecFactory(char *eBuff, int eBlen, const char *seclib)
XrdSecProtector * XrdSecLoadProtection(XrdSysError &erP)
int XrdSecGetProtection(XrdSecProtect *&protP, XrdSecProtocol &aprot, ServerResponseBody_Protocol &resp, unsigned int resplen)
XrdSecService * XrdSecLoadSecService(XrdSysError *eDest, const char *cfn, const char *seclib, XrdSecGetProt_t *getP, XrdSecProtector **proP)
void * Resolve(const char *symbl, int mcnt=1)
void Unload(bool dodel=false)
virtual XrdSecProtect * New4Client(XrdSecProtocol &aprot, const ServerResponseReqs_Protocol &inReqs, unsigned int reqLen)
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
XrdSysLogger * logger(XrdSysLogger *lp=0)
XrdVERSIONINFODEF(myVersion, cmsclient, XrdVNUMBER, XrdVERSION)
XrdSecProtector * theProtector