XRootD
XrdVomsHttp Class Reference
+ Inheritance diagram for XrdVomsHttp:
+ Collaboration diagram for XrdVomsHttp:

Public Member Functions

 XrdVomsHttp (XrdSysError *erp, XrdVomsFun &vFun)
 
virtual int FreeSSL (SSL *)
 
virtual int GetSecData (XrdLink *, XrdSecEntity &, SSL *)
 
virtual int Init (SSL_CTX *, int)
 
virtual int InitSSL (SSL *ssl, char *cadir)
 
- Public Member Functions inherited from XrdHttpSecXtractor
 XrdHttpSecXtractor ()
 Constructor. More...
 
virtual ~XrdHttpSecXtractor ()
 Destructor. More...
 

Detailed Description

Definition at line 55 of file XrdVomsHttp.cc.

Constructor & Destructor Documentation

◆ XrdVomsHttp()

XrdVomsHttp::XrdVomsHttp ( XrdSysError erp,
XrdVomsFun vFun 
)
inline

Definition at line 72 of file XrdVomsHttp.cc.

73  : vomsFun(vFun), eDest(erp) {};

Member Function Documentation

◆ FreeSSL()

virtual int XrdVomsHttp::FreeSSL ( SSL *  )
inlinevirtual

Reimplemented from XrdHttpSecXtractor.

Definition at line 70 of file XrdVomsHttp.cc.

70 {return 0;}

◆ GetSecData()

int XrdVomsHttp::GetSecData ( XrdLink lp,
XrdSecEntity sec,
SSL *  ssl 
)
virtual

Implements XrdHttpSecXtractor.

Definition at line 85 of file XrdVomsHttp.cc.

86 {
87  Voms_x509_in_t xCerts;
88  int rc;
89 
90 // Make sure the certs have been verified. Note that HTTP doesn't do well if
91 // we return failure. So, we always return success as there will be no entity.
92 //
93 //
94  if (SSL_get_verify_result(ssl) != X509_V_OK) return 0;
95 
96 // Get the certs
97 //
98  xCerts.cert = SSL_get_peer_certificate(ssl);
99  if (!xCerts.cert) return 0;
100  xCerts.chain = SSL_get_peer_cert_chain(ssl);
101 
102 // The API calls for the cert member in the SecEntity point to the certs
103 //
104  sec.creds = (char *)&xCerts;
105 
106 // Do the voms tango now and upon success pretend we are "gsi" authentication
107 //
108  if (!(rc = vomsFun.VOMSFun(sec))) strcpy(sec.prot, "gsi");
109 
110 // Free the x509 cert the chain will stick arround until the session is freed
111 //
112  X509_free(xCerts.cert);
113 
114 // All done
115 //
116  sec.creds = 0;
117  return rc;
118 }
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
Definition: XrdSecEntity.hh:67
char * creds
Raw entity credentials or cert.
Definition: XrdSecEntity.hh:77
int VOMSFun(XrdSecEntity &ent)
Definition: XrdVomsFun.cc:191
X509 * cert
Definition: XrdVoms.hh:40

References Voms_x509_in_t::cert, XrdSecEntity::creds, XrdSecEntity::prot, and XrdVomsFun::VOMSFun().

+ Here is the call graph for this function:

◆ Init()

virtual int XrdVomsHttp::Init ( SSL_CTX *  ,
int   
)
inlinevirtual

Implements XrdHttpSecXtractor.

Definition at line 66 of file XrdVomsHttp.cc.

66 {return 0;}

◆ InitSSL()

virtual int XrdVomsHttp::InitSSL ( SSL *  ssl,
char *  cadir 
)
inlinevirtual

Reimplemented from XrdHttpSecXtractor.

Definition at line 69 of file XrdVomsHttp.cc.

69 {return 0;}

The documentation for this class was generated from the following file: