xrootd
Classes | Macros | Functions
XrdCryptosslgsiAux.cc File Reference
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <openssl/asn1.h>
#include <openssl/asn1_mac.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include <openssl/x509v3.h>
#include "XrdSut/XrdSutRndm.hh"
#include "XrdCrypto/XrdCryptosslgsiAux.hh"
#include "XrdCrypto/XrdCryptoTrace.hh"
#include "XrdCrypto/XrdCryptosslAux.hh"
#include "XrdCrypto/XrdCryptosslRSA.hh"
#include "XrdCrypto/XrdCryptosslX509.hh"
#include "XrdCrypto/XrdCryptosslX509Req.hh"
Include dependency graph for XrdCryptosslgsiAux.cc:

Classes

struct  gsiProxyPolicy_t
 
struct  gsiProxyCertInfo_t
 

Macros

#define XRDGSI_VOMS_ATCAP_OID   "1.3.6.1.4.1.8005.100.100.4"
 
#define XRDGSI_VOMS_ACSEQ_OID   "1.3.6.1.4.1.8005.100.100.5"
 
#define BIO_PRINT(b, c)
 
#define BIO_GET_STRING(b, str)
 
#define XRDGSI_CONST
 
#define ASN1_F_GSIPROXYCERTINFO_NEW   500
 
#define ASN1_F_D2I_GSIPROXYCERTINFO   501
 
#define ASN1_F_GSIPROXYPOLICY_NEW   510
 
#define ASN1_F_D2I_GSIPROXYPOLICY   511
 

Functions

int XrdSslgsiX509Asn1PrintInfo (int tag, int xclass, int constructed, int indent)
 
int XrdSslgsiX509FillUnknownExt (XRDGSI_CONST unsigned char **pp, long length)
 
int XrdSslgsiX509FillVOMS (XRDGSI_CONST unsigned char **pp, long length, bool &getvat, XrdOucString &vat)
 
static ASN1_OBJECT * OBJ_txt2obj_fix (const char *s, int no_name)
 
gsiProxyPolicy_tgsiProxyPolicy_new ()
 
void gsiProxyPolicy_free (gsiProxyPolicy_t *pol)
 
gsiProxyPolicy_td2i_gsiProxyPolicy (gsiProxyPolicy_t **pol, XRDGSI_CONST unsigned char **pp, long length)
 
int i2d_gsiProxyPolicy (gsiProxyPolicy_t *pol, unsigned char **pp)
 
gsiProxyCertInfo_tgsiProxyCertInfo_new ()
 
void gsiProxyCertInfo_free (gsiProxyCertInfo_t *pci)
 
gsiProxyCertInfo_td2i_gsiProxyCertInfo (gsiProxyCertInfo_t **pci, XRDGSI_CONST unsigned char **pp, long length)
 
int i2d_gsiProxyCertInfo (gsiProxyCertInfo_t *pci, unsigned char **pp)
 
bool XrdSslgsiProxyCertInfo (const void *extdata, int &pathlen, bool *haspolicy)
 
void XrdSslgsiSetPathLenConstraint (void *extdata, int pathlen)
 
int XrdSslgsiX509CreateProxy (const char *fnc, const char *fnk, XrdProxyOpt_t *pxopt, XrdCryptosslgsiX509Chain *xp, XrdCryptoRSA **kp, const char *fnp)
 
int XrdSslgsiX509CreateProxyReq (XrdCryptoX509 *xcpi, XrdCryptoX509Req **xcro, XrdCryptoRSA **kcro)
 
int XrdSslgsiX509SignProxyReq (XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, XrdCryptoX509Req *xcri, XrdCryptoX509 **xcpo)
 
int XrdSslgsiX509DumpExtensions (XrdCryptoX509 *xcpi)
 
int XrdSslgsiX509GetVOMSAttr (XrdCryptoX509 *xcpi, XrdOucString &vat)
 

Macro Definition Documentation

#define ASN1_F_D2I_GSIPROXYCERTINFO   501

Referenced by d2i_gsiProxyCertInfo().

#define ASN1_F_D2I_GSIPROXYPOLICY   511

Referenced by d2i_gsiProxyPolicy().

#define ASN1_F_GSIPROXYCERTINFO_NEW   500

Referenced by gsiProxyCertInfo_new().

#define ASN1_F_GSIPROXYPOLICY_NEW   510

Referenced by gsiProxyPolicy_new().

#define BIO_GET_STRING (   b,
  str 
)
Value:
BUF_MEM *bptr; \
BIO_get_mem_ptr(b, &bptr); \
if (bptr) { \
char *s = new char[bptr->length+1]; \
memcpy(s, bptr->data, bptr->length); \
s[bptr->length] = '\0'; \
str = s; \
delete [] s; \
} else { \
PRINT("ERROR: GET_STRING: BIO internal buffer undefined!"); \
} \
if (b) BIO_free(b);

Referenced by XrdSslgsiX509FillVOMS().

#define BIO_PRINT (   b,
 
)
Value:
BUF_MEM *bptr; \
BIO_get_mem_ptr(b, &bptr); \
if (bptr) { \
char *s = new char[bptr->length+1]; \
memcpy(s, bptr->data, bptr->length); \
s[bptr->length] = '\0'; \
PRINT(c << s); \
delete [] s; \
} else { \
PRINT("ERROR: "<<c<<" BIO internal buffer undefined!"); \
} \
if (b) BIO_free(b);

Referenced by XrdSslgsiX509Asn1PrintInfo(), and XrdSslgsiX509FillUnknownExt().

#define XRDGSI_CONST
#define XRDGSI_VOMS_ACSEQ_OID   "1.3.6.1.4.1.8005.100.100.5"
#define XRDGSI_VOMS_ATCAP_OID   "1.3.6.1.4.1.8005.100.100.4"

Referenced by XrdSslgsiX509FillVOMS().

Function Documentation

gsiProxyCertInfo_t* d2i_gsiProxyCertInfo ( gsiProxyCertInfo_t **  pci,
XRDGSI_CONST unsigned char **  pp,
long  length 
)
gsiProxyPolicy_t* d2i_gsiProxyPolicy ( gsiProxyPolicy_t **  pol,
XRDGSI_CONST unsigned char **  pp,
long  length 
)
void gsiProxyCertInfo_free ( gsiProxyCertInfo_t pci)
gsiProxyCertInfo_t* gsiProxyCertInfo_new ( )
void gsiProxyPolicy_free ( gsiProxyPolicy_t pol)
gsiProxyPolicy_t* gsiProxyPolicy_new ( )
int i2d_gsiProxyCertInfo ( gsiProxyCertInfo_t pci,
unsigned char **  pp 
)
int i2d_gsiProxyPolicy ( gsiProxyPolicy_t pol,
unsigned char **  pp 
)
static ASN1_OBJECT* OBJ_txt2obj_fix ( const char *  s,
int  no_name 
)
static
bool XrdSslgsiProxyCertInfo ( const void *  extdata,
int &  pathlen,
bool *  haspolicy 
)
void XrdSslgsiSetPathLenConstraint ( void *  extdata,
int  pathlen 
)
int XrdSslgsiX509Asn1PrintInfo ( int  tag,
int  xclass,
int  constructed,
int  indent 
)

References BIO_PRINT, and EPNAME.

Referenced by XrdSslgsiX509FillUnknownExt().

int XrdSslgsiX509CreateProxy ( const char *  fnc,
const char *  fnk,
XrdProxyOpt_t pxopt,
XrdCryptosslgsiX509Chain xp,
XrdCryptoRSA **  kp,
const char *  fnp 
)
int XrdSslgsiX509CreateProxyReq ( XrdCryptoX509 xcpi,
XrdCryptoX509Req **  xcro,
XrdCryptoRSA **  kcro 
)
int XrdSslgsiX509DumpExtensions ( XrdCryptoX509 xcpi)
int XrdSslgsiX509FillUnknownExt ( XRDGSI_CONST unsigned char **  pp,
long  length 
)
int XrdSslgsiX509FillVOMS ( XRDGSI_CONST unsigned char **  pp,
long  length,
bool &  getvat,
XrdOucString vat 
)
int XrdSslgsiX509GetVOMSAttr ( XrdCryptoX509 xcpi,
XrdOucString vat 
)
int XrdSslgsiX509SignProxyReq ( XrdCryptoX509 xcpi,
XrdCryptoRSA kcpi,
XrdCryptoX509Req xcri,
XrdCryptoX509 **  xcpo 
)