33 #include <sys/types.h>
35 #include "XrdVersion.hh"
56 protoProtector baseProtector;
73 ProtInfo() : theProt(0), relaxed(false), force(false)
140 noProt = (lrTab[
isLcl].theProt == 0) && (lrTab[
isRmt].theProt == 0);
184 static const char *lvlVec[] = {
"none",
"compatible",
"standard",
185 "intense",
"pedantic"};
195 return lvlVec[level];
209 unsigned int vLen =
static_cast<unsigned int>(inReqs.
secvsz)
216 if (vLen+hdrLen > reqLen
222 okED = aprot.
getKey() > 0;
241 static const char *wFrc =
"authentication can't encrypt; "
242 "continuing without it!";
243 static const char *wIgn =
"authentication can't encrypt; "
244 "allowing unsigned requests!";
251 if (noProt)
return 0;
255 if (lrSame) theLR =
isLcl;
260 if (lrTab[theLR].theProt == 0)
return 0;
268 okED = aprot.
getKey() > 0;
274 action = (lrTab[theLR].force ? wFrc : wIgn);
276 if (!lrTab[theLR].force)
return 0;
281 secP =
new XrdSecProtect(&aprot, *lrTab[theLR].theProt, okED);
301 if (noProt)
return 0;
306 else myResp = &lrTab[
isRmt].reqs;
310 memcpy(&resp, myResp, rsplen);
#define kXR_PROTSIGNVERSION
#define kXR_secCompatible
#define XrdSecPROTOIDSIZE
XrdVERSIONINFO(XrdSecProtObjectP,"secProt")
XrdSecProtector * XrdSecProtObjectP
static bool InDomain(XrdNetAddrInfo *epaddr)
XrdNetAddrInfo * addrInfo
Entity's connection details.
const char * tident
Trace identifier always preset.
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
static const int doData
Secure data.
static const int relax
relax old clients
secLevel level
In: The desired level.
static const int force
Allow unencryted hash.
void SetProtection(const ServerResponseReqs_Protocol &inReqs)
virtual XrdSecProtect * New4Client(XrdSecProtocol &aprot, const ServerResponseReqs_Protocol &inReqs, unsigned int reqLen)
virtual XrdSecProtect * New4Server(XrdSecProtocol &aprot, int plvl)
virtual int ProtResp(ServerResponseReqs_Protocol &resp, XrdNetAddrInfo &nai, int pver)
virtual bool Config(const XrdSecProtectParms &lclParms, const XrdSecProtectParms &rmtParms, XrdSysLogger &logr)
virtual const char * LName(XrdSecProtectParms::secLevel level)
virtual int getKey(char *buff=0, int size=0)
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
XrdSysLogger * logger(XrdSysLogger *lp=0)