xrootd
XrdSecProtector.hh
Go to the documentation of this file.
1 #ifndef __XRDSECPROTECTOR_H__
2 #define __XRDSECPROTECTOR_H__
3 /******************************************************************************/
4 /* */
5 /* X r d S e c P r o t e c t o r . h h */
6 /* */
7 /* (c) 2016 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* Produced by Andrew Hanushevsky for Stanford University under contract */
9 /* DE-AC02-76-SFO0515 with the Department of Energy */
10 /* */
11 /* This file is part of the XRootD software suite. */
12 /* */
13 /* XRootD is free software: you can redistribute it and/or modify it under */
14 /* the terms of the GNU Lesser General Public License as published by the */
15 /* Free Software Foundation, either version 3 of the License, or (at your */
16 /* option) any later version. */
17 /* */
18 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21 /* License for more details. */
22 /* */
23 /* You should have received a copy of the GNU Lesser General Public License */
24 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26 /* */
27 /* The copyright holder's institutional names and contributor's names may not */
28 /* be used to endorse or promote products derived from this software without */
29 /* specific prior written permission of the institution or contributor. */
30 /******************************************************************************/
31 
32 #include "XProtocol/XPtypes.hh"
33 
34 /******************************************************************************/
35 /* X r d S e c P r o t e c t P a r m s */
36 /******************************************************************************/
37 
39 {
40 public:
41 
42 enum secLevel {secNone = 0,
45  };
46 
48 int opts;
49 
50 static const int doData = 0x0000001;
51 static const int relax = 0x0000002;
52 static const int force = 0x0000004;
53 
56 };
57 
58 /******************************************************************************/
59 /* X r d S e c P r o t e c t o r */
60 /******************************************************************************/
61 
62 //------------------------------------------------------------------------------
64 //------------------------------------------------------------------------------
65 
67 class XrdNetAddrInfo;
68 class XrdSecProtect;
69 class XrdSecProtocol;
70 class XrdSysLogger;
71 
73 {
74 public:
75 
76 //------------------------------------------------------------------------------
84 //------------------------------------------------------------------------------
85 
86 virtual bool Config(const XrdSecProtectParms &lclParms,
87  const XrdSecProtectParms &rmtParms,
88  XrdSysLogger &logr);
89 
90 //------------------------------------------------------------------------------
96 //------------------------------------------------------------------------------
97 
98 virtual const char *LName(XrdSecProtectParms::secLevel level);
99 
100 //------------------------------------------------------------------------------
113 //------------------------------------------------------------------------------
114 
115 virtual XrdSecProtect *New4Client( XrdSecProtocol &aprot,
116  const ServerResponseReqs_Protocol &inReqs,
117  unsigned int reqLen);
118 
119 //------------------------------------------------------------------------------
129 //------------------------------------------------------------------------------
130 
131 virtual XrdSecProtect *New4Server(XrdSecProtocol &aprot, int plvl);
132 
133 //------------------------------------------------------------------------------
141 //------------------------------------------------------------------------------
142 
143 virtual int ProtResp(ServerResponseReqs_Protocol &resp,
144  XrdNetAddrInfo &nai, int pver);
145 
146 //------------------------------------------------------------------------------
148 //------------------------------------------------------------------------------
149 
150 virtual ~XrdSecProtector() {}
151 
152 enum lrType {isLcl=0, isRmt=1, isLR=2};
153 
154 protected:
155 
157 
158 private:
159 void Config(const XrdSecProtectParms &parms,
161 };
162 #endif
static const int force
Allow unencryted hash.
Definition: XrdSecProtector.hh:52
secLevel
Definition: XrdSecProtector.hh:42
Definition: XProtocol.hh:1084
Definition: XrdSecProtector.hh:43
virtual XrdSecProtect * New4Server(XrdSecProtocol &aprot, int plvl)
XrdSecProtector()
Definition: XrdSecProtector.hh:156
Definition: XrdSecProtector.hh:152
Definition: XrdSecInterface.hh:130
~XrdSecProtectParms()
Definition: XrdSecProtector.hh:55
Definition: XrdSecProtector.hh:152
Definition: XrdSecProtect.hh:55
Definition: XrdSecProtector.hh:38
lrType
Definition: XrdSecProtector.hh:152
XrdSecProtectParms()
Definition: XrdSecProtector.hh:54
virtual int ProtResp(ServerResponseReqs_Protocol &resp, XrdNetAddrInfo &nai, int pver)
Definition: XrdSecProtector.hh:43
Definition: XrdSecProtector.hh:152
Definition: XrdSecProtector.hh:43
Definition: XrdSecProtector.hh:72
virtual bool Config(const XrdSecProtectParms &lclParms, const XrdSecProtectParms &rmtParms, XrdSysLogger &logr)
static const int relax
relax old clients
Definition: XrdSecProtector.hh:51
secLevel level
In: The desired level.
Definition: XrdSecProtector.hh:47
Definition: XrdNetAddrInfo.hh:53
Definition: XrdSysLogger.hh:52
Definition: XrdSecProtector.hh:43
Definition: XrdSecProtector.hh:44
virtual ~XrdSecProtector()
Destructor.
Definition: XrdSecProtector.hh:150
virtual XrdSecProtect * New4Client(XrdSecProtocol &aprot, const ServerResponseReqs_Protocol &inReqs, unsigned int reqLen)
int opts
In: Options:
Definition: XrdSecProtector.hh:48
static const int doData
Secure data.
Definition: XrdSecProtector.hh:50
virtual const char * LName(XrdSecProtectParms::secLevel level)
Definition: XrdSecProtector.hh:42