Loading...
Searching...
No Matches
XrdSecClient.cc File Reference
`#include <unistd.h>`
`#include <cctype>`
`#include <cerrno>`
`#include <netdb.h>`
`#include <cstdlib>`
`#include <cstring>`
`#include <cstdio>`
`#include <iomanip>`
`#include <sys/param.h>`
`#include <sys/types.h>`
`#include "XrdNet/XrdNetAddrInfo.hh"`
`#include "XrdOuc/XrdOucErrInfo.hh"`
`#include "XrdSys/XrdSysHeaders.hh"`
`#include "XrdSys/XrdSysPthread.hh"`
`#include "XrdSec/XrdSecPManager.hh"`
`#include "XrdSec/XrdSecInterface.hh"`
Include dependency graph for XrdSecClient.cc:

Go to the source code of this file.

## Classes

class | XrdSecProtNone

## Macros

#define | DEBUG(x)

## Functions

XrdSecProtocol * | XrdSecGetProtocol (const char *hostname, XrdNetAddrInfo &endPoint, XrdSecParameters &parms, XrdOucErrInfo *einfo)

## Macro Definition Documentation

## DEBUG

#define DEBUG | ( |  | x | ) |

Value:
{if (DebugON) std::cerr <<"sec_Client: " <<x <<std::endl;}
DebugON
int DebugON
Definition XrdCryptosslFactory.hh:43

Definition at line 53 of file XrdSecClient.cc.

Referenced by XrdSecGetProtocol().

## Function Documentation

## XrdSecGetProtocol()

XrdSecProtocol * XrdSecGetProtocol | ( | const char * | hostname,
|  | XrdNetAddrInfo & | endPoint,
|  | XrdSecParameters & | parms,
|  | XrdOucErrInfo * | einfo )

Definition at line 86 of file XrdSecClient.cc.

{
static int DebugON = ((getenv("XrdSecDEBUG") &&
strcmp(getenv("XrdSecDEBUG"), "0")) ? 1 : 0);
static XrdSecProtNone ProtNone;
static XrdSecPManager PManager(DebugON, getenv("XrdSecPROXY") != 0,
getenv("XrdSecPROXYCREDS") != 0);
const char *noperr = "XrdSec: No authentication protocols are available.";
XrdSecProtocol *protp;
// Perform any required debugging
//
DEBUG("protocol request for host " <<hostname <<" token='"
<<(parms.size > 0 ? std::setw(parms.size) : std::setw(1))
<<(parms.size > 0 ? parms.buffer : "") <<"'");
// Check if the server wants no security.
//
if (!parms.size || !parms.buffer[0]) return (XrdSecProtocol *)&ProtNone;
// Find a supported protocol.
//
if (!(protp = PManager.Get(hostname, endPoint, parms, einfo)))
{if (einfo) einfo->setErrInfo(ENOPROTOOPT, noperr);
else std::cerr <<noperr <<std::endl;
}
// All done
//
return protp;
}
DEBUG
#define DEBUG(x)
Definition XrdSecClient.cc:53
XrdOucErrInfo::setErrInfo
int setErrInfo(int code, const char *emsg)
Definition XrdOucErrInfo.hh:147
XrdSecPManager
Definition XrdSecPManager.hh:48
XrdSecProtNone
Definition XrdSecClient.cc:60
XrdSecProtocol
Definition XrdSecInterface.hh:131
XrdSecBuffer::buffer
char * buffer
Pointer to the buffer.
Definition XrdSecInterface.hh:53
XrdSecBuffer::size
int size
Size of the buffer or length of data in the buffer.
Definition XrdSecInterface.hh:52

References XrdSecBuffer::buffer, DEBUG, DebugON, XrdSecPManager::Get(), XrdOucErrInfo::setErrInfo(), and XrdSecBuffer::size.

Referenced by main(), and XrdVERSIONINFO().

Here is the call graph for this function:
Here is the caller graph for this function: