xrootd
Loading...
Searching...
No Matches
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{
40public:
41
46
48int opts;
49
50static const int doData = 0x0000001;
51static const int relax = 0x0000002;
52static 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
67class XrdNetAddrInfo;
68class XrdSecProtect;
69class XrdSecProtocol;
70class XrdSysLogger;
71
73{
74public:
75
76//------------------------------------------------------------------------------
84//------------------------------------------------------------------------------
85
86virtual bool Config(const XrdSecProtectParms &lclParms,
87 const XrdSecProtectParms &rmtParms,
88 XrdSysLogger &logr);
89
90//------------------------------------------------------------------------------
96//------------------------------------------------------------------------------
97
98virtual const char *LName(XrdSecProtectParms::secLevel level);
99
100//------------------------------------------------------------------------------
113//------------------------------------------------------------------------------
114
116 const ServerResponseReqs_Protocol &inReqs,
117 unsigned int reqLen);
118
119//------------------------------------------------------------------------------
129//------------------------------------------------------------------------------
130
131virtual XrdSecProtect *New4Server(XrdSecProtocol &aprot, int plvl);
132
133//------------------------------------------------------------------------------
141//------------------------------------------------------------------------------
142
144 XrdNetAddrInfo &nai, int pver);
145
146//------------------------------------------------------------------------------
148//------------------------------------------------------------------------------
149
151
152enum lrType {isLcl=0, isRmt=1, isLR=2};
153
154protected:
155
157
158private:
159void Config(const XrdSecProtectParms &parms,
161};
162#endif
Definition XrdNetAddrInfo.hh:54
Definition XrdSecProtector.hh:39
~XrdSecProtectParms()
Definition XrdSecProtector.hh:55
secLevel
Definition XrdSecProtector.hh:42
@ secFence
Definition XrdSecProtector.hh:44
@ secIntense
Definition XrdSecProtector.hh:43
@ secStandard
Definition XrdSecProtector.hh:43
@ secNone
Definition XrdSecProtector.hh:42
@ secPedantic
Definition XrdSecProtector.hh:43
@ secCompatible
Definition XrdSecProtector.hh:43
static const int doData
Secure data.
Definition XrdSecProtector.hh:50
static const int relax
relax old clients
Definition XrdSecProtector.hh:51
secLevel level
In: The desired level.
Definition XrdSecProtector.hh:47
XrdSecProtectParms()
Definition XrdSecProtector.hh:54
static const int force
Allow unencryted hash.
Definition XrdSecProtector.hh:52
int opts
In: Options:
Definition XrdSecProtector.hh:48
Definition XrdSecProtect.hh:56
Definition XrdSecProtector.hh:73
virtual XrdSecProtect * New4Server(XrdSecProtocol &aprot, int plvl)
lrType
Definition XrdSecProtector.hh:152
@ isRmt
Definition XrdSecProtector.hh:152
@ isLR
Definition XrdSecProtector.hh:152
@ isLcl
Definition XrdSecProtector.hh:152
virtual bool Config(const XrdSecProtectParms &lclParms, const XrdSecProtectParms &rmtParms, XrdSysLogger &logr)
virtual const char * LName(XrdSecProtectParms::secLevel level)
void Config(const XrdSecProtectParms &parms, ServerResponseReqs_Protocol &reqs)
virtual XrdSecProtect * New4Client(XrdSecProtocol &aprot, const ServerResponseReqs_Protocol &inReqs, unsigned int reqLen)
virtual int ProtResp(ServerResponseReqs_Protocol &resp, XrdNetAddrInfo &nai, int pver)
virtual ~XrdSecProtector()
Destructor.
Definition XrdSecProtector.hh:150
XrdSecProtector()
Definition XrdSecProtector.hh:156
Definition XrdSecInterface.hh:131
Definition XrdSysLogger.hh:53
Definition XProtocol.hh:1104