xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XrdHttpSecXtractor.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of XrdHTTP: A pragmatic implementation of the
3 // HTTP/WebDAV protocol for the Xrootd framework
4 //
5 // Copyright (c) 2013 by European Organization for Nuclear Research (CERN)
6 // Author: Fabrizio Furano <furano@cern.ch>
7 // File Date: Nov 2012
8 //------------------------------------------------------------------------------
9 // XRootD is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU Lesser General Public License as published by
11 // the Free Software Foundation, either version 3 of the License, or
12 // (at your option) any later version.
13 //
14 // XRootD is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public License
20 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
21 //------------------------------------------------------------------------------
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 #ifndef __XRDHTTPSECXTRACTOR_H__
34 #define __XRDHTTPSECXTRACTOR_H__
35 
36 #include <openssl/ssl.h>
37 
38 class XrdLink;
39 class XrdSecEntity;
40 
42 {
43 public:
44 
45  // Extract security info from the link instance, and use it to populate
46  // the given XrdSec instance
47  virtual int GetSecData(XrdLink *, XrdSecEntity &, SSL *) = 0;
48 
49 
50  // Initializes an ssl ctx
51  virtual int Init(SSL_CTX *, int) = 0;
52  virtual int InitSSL(SSL *, char *) { return -1; };
53  virtual int FreeSSL(SSL *) { return -1; };
54 
55 //------------------------------------------------------------------------------
57 //------------------------------------------------------------------------------
58 
60 
61 //------------------------------------------------------------------------------
63 //------------------------------------------------------------------------------
64 
65 virtual ~XrdHttpSecXtractor() {}
66 };
67 
68 /******************************************************************************/
69 /* X r d H t t p G e t S e c X t r a c t o r */
70 /******************************************************************************/
71 
72 //------------------------------------------------------------------------------
89 
90 //------------------------------------------------------------------------------
91 
92 class XrdSysError;
93 
94 #define XrdHttpSecXtractorArgs XrdSysError *eDest, \
95  const char *confg, \
96  const char *parms
97 
99 
100 //------------------------------------------------------------------------------
106 //------------------------------------------------------------------------------
107 
113 #endif
virtual int Init(SSL_CTX *, int)=0
Definition: XrdSysError.hh:89
XrdHttpSecXtractor()
Constructor.
Definition: XrdHttpSecXtractor.hh:59
virtual int FreeSSL(SSL *)
Definition: XrdHttpSecXtractor.hh:53
virtual int GetSecData(XrdLink *, XrdSecEntity &, SSL *)=0
virtual ~XrdHttpSecXtractor()
Destructor.
Definition: XrdHttpSecXtractor.hh:65
XrdHttpSecXtractor * XrdHttpGetSecXtractor(XrdHttpSecXtractorArgs)
#define XrdHttpSecXtractorArgs
Definition: XrdHttpSecXtractor.hh:94
virtual int InitSSL(SSL *, char *)
Definition: XrdHttpSecXtractor.hh:52
Definition: XrdHttpSecXtractor.hh:41
Definition: XrdSecEntity.hh:63