xrootd
Loading...
Searching...
No Matches
XrdSecPManager.hh
Go to the documentation of this file.
1#ifndef __SEC_PMANAGER_HH__
2#define __SEC_PMANAGER_HH__
3/******************************************************************************/
4/* */
5/* X r d S e c P M a n a g e r . h h */
6/* */
7/* (c) 2003 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
35
36class XrdNetAddrInfo;
37class XrdOucErrInfo;
38class XrdSecProtList;
39class XrdSecProtocol;
40class XrdSysError;
41
42typedef int XrdSecPMask_t;
43
44#define PROTPARMS const char, const char *, XrdNetAddrInfo &, \
45 const char *, XrdOucErrInfo *
46
48{
49public:
50
51XrdSecPMask_t Find(const char *pid, // In
52 char **parg=0); // Out
53
54XrdSecProtocol *Get(const char *hname,
55 XrdNetAddrInfo &endPoint,
56 const char *pname,
57 XrdOucErrInfo *erp);
58
59XrdSecProtocol *Get(const char *hname,
60 XrdNetAddrInfo &netaddr,
61 XrdSecParameters &secparm)
62 {return Get(hname, netaddr, secparm, (XrdOucErrInfo *)0);}
63
64XrdSecProtocol *Get(const char *hname,
65 XrdNetAddrInfo &netaddr,
66 XrdSecParameters &secparm,
67 XrdOucErrInfo *erp);
68
69int Load(XrdOucErrInfo *eMsg, // In
70 const char pmode, // In 'c' | 's'
71 const char *pid, // In
72 const char *parg, // In
73 const char *path) // In
74 {return (0 != ldPO(eMsg, pmode, pid, parg, path));}
75
76void setDebug(int dbg) {DebugON = dbg;}
77
78void setErrP(XrdSysError *eP) {errP = eP;}
79
80const char *protTLS() {return tlsProt;}
81
82 XrdSecPManager(int dbg=0, bool secproxy=false,
83 bool fwdcreds=false)
84 : protnum(1), First(0), Last(0), errP(0),
85 tlsProt(0), DebugON(dbg), isProxy(secproxy),
86 fwdCreds(fwdcreds) {}
88
89private:
90
91XrdSecProtList *Add(XrdOucErrInfo *eMsg, const char *pid,
92 XrdSecProtocol *(*ep)(PROTPARMS), const char *parg);
93XrdSecProtList *ldPO(XrdOucErrInfo *eMsg, // In
94 const char pmode, // In 'c' | 's'
95 const char *pid, // In
96 const char *parg=0, // In
97 const char *spath=0);// In
98XrdSecProtList *Lookup(const char *pid);
99
102XrdSecProtList *First;
103XrdSecProtList *Last;
109};
110#endif
int XrdSecPMask_t
Definition XrdSecPManager.hh:42
#define PROTPARMS
Definition XrdSecPManager.hh:44
Definition XrdNetAddrInfo.hh:54
Definition XrdOucErrInfo.hh:101
Definition XrdSecPManager.hh:48
XrdSecProtList * Last
Definition XrdSecPManager.hh:103
char * tlsProt
Definition XrdSecPManager.hh:105
XrdSecPMask_t Find(const char *pid, char **parg=0)
XrdSecProtocol * Get(const char *hname, XrdNetAddrInfo &netaddr, XrdSecParameters &secparm)
Definition XrdSecPManager.hh:59
int DebugON
Definition XrdSecPManager.hh:106
const char * protTLS()
Definition XrdSecPManager.hh:80
bool isProxy
Definition XrdSecPManager.hh:107
XrdSysMutex myMutex
Definition XrdSecPManager.hh:101
XrdSecProtList * First
Definition XrdSecPManager.hh:102
XrdSecProtocol * Get(const char *hname, XrdNetAddrInfo &endPoint, const char *pname, XrdOucErrInfo *erp)
XrdSecProtocol * Get(const char *hname, XrdNetAddrInfo &netaddr, XrdSecParameters &secparm, XrdOucErrInfo *erp)
XrdSecPManager(int dbg=0, bool secproxy=false, bool fwdcreds=false)
Definition XrdSecPManager.hh:82
XrdSecProtList * ldPO(XrdOucErrInfo *eMsg, const char pmode, const char *pid, const char *parg=0, const char *spath=0)
XrdSysError * errP
Definition XrdSecPManager.hh:104
XrdSecPMask_t protnum
Definition XrdSecPManager.hh:100
bool fwdCreds
Definition XrdSecPManager.hh:108
int Load(XrdOucErrInfo *eMsg, const char pmode, const char *pid, const char *parg, const char *path)
Definition XrdSecPManager.hh:69
XrdSecProtList * Lookup(const char *pid)
XrdSecProtList * Add(XrdOucErrInfo *eMsg, const char *pid, XrdSecProtocol *(*ep)(PROTPARMS), const char *parg)
~XrdSecPManager()
Definition XrdSecPManager.hh:87
void setErrP(XrdSysError *eP)
Definition XrdSecPManager.hh:78
void setDebug(int dbg)
Definition XrdSecPManager.hh:76
Definition XrdSecInterface.hh:131
Definition XrdSysError.hh:90
Definition XrdSysPthread.hh:165
Generic structure to pass security information back and forth.
Definition XrdSecInterface.hh:51