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>

Go to the source code of this file.

Classes

struct  gsiProxyPolicy_t
struct  gsiProxyCertInfo_t

Defines

#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

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, 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, 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)

Variables

const char * XrdCryptosslgsiAuxCVSID = "$Id: XrdCryptosslgsiAux.cc 31508 2009-12-02 19:11:01Z brun $"


Define Documentation

#define ASN1_F_D2I_GSIPROXYCERTINFO   501

Definition at line 59 of file XrdCryptosslgsiAux.cc.

Referenced by d2i_gsiProxyCertInfo().

#define ASN1_F_D2I_GSIPROXYPOLICY   511

Definition at line 61 of file XrdCryptosslgsiAux.cc.

Referenced by d2i_gsiProxyPolicy().

#define ASN1_F_GSIPROXYCERTINFO_NEW   500

Definition at line 58 of file XrdCryptosslgsiAux.cc.

Referenced by gsiProxyCertInfo_new().

#define ASN1_F_GSIPROXYPOLICY_NEW   510

Definition at line 60 of file XrdCryptosslgsiAux.cc.

Referenced by gsiProxyPolicy_new().


Function Documentation

gsiProxyCertInfo_t* d2i_gsiProxyCertInfo ( gsiProxyCertInfo_t **  pci,
unsigned char **  pp,
long  length 
)

Definition at line 273 of file XrdCryptosslgsiAux.cc.

References ASN1_F_D2I_GSIPROXYCERTINFO, d2i_gsiProxyPolicy(), gsiProxyCertInfo_free(), and gsiProxyCertInfo_new().

Referenced by XrdSslgsiProxyCertInfo(), XrdSslgsiSetPathLenConstraint(), XrdSslgsiX509CreateProxyReq(), and XrdSslgsiX509SignProxyReq().

gsiProxyPolicy_t* d2i_gsiProxyPolicy ( gsiProxyPolicy_t **  pol,
unsigned char **  pp,
long  length 
)

Definition at line 164 of file XrdCryptosslgsiAux.cc.

References ASN1_F_D2I_GSIPROXYPOLICY, gsiProxyPolicy_free(), and gsiProxyPolicy_new().

Referenced by d2i_gsiProxyCertInfo().

void gsiProxyCertInfo_free ( gsiProxyCertInfo_t pci  ) 

Definition at line 251 of file XrdCryptosslgsiAux.cc.

References gsiProxyCertInfo_t::proxyCertPathLengthConstraint.

Referenced by d2i_gsiProxyCertInfo().

gsiProxyCertInfo_t* gsiProxyCertInfo_new (  ) 

Definition at line 228 of file XrdCryptosslgsiAux.cc.

References ASN1_F_GSIPROXYCERTINFO_NEW, c, gsiProxyPolicy_new(), gsiProxyCertInfo_t::proxyCertPathLengthConstraint, and gsiProxyCertInfo_t::proxyPolicy.

Referenced by d2i_gsiProxyCertInfo(), XrdSslgsiX509CreateProxy(), XrdSslgsiX509CreateProxyReq(), and XrdSslgsiX509SignProxyReq().

void gsiProxyPolicy_free ( gsiProxyPolicy_t pol  ) 

Definition at line 134 of file XrdCryptosslgsiAux.cc.

References gsiProxyPolicy_t::policy, and gsiProxyPolicy_t::policyLanguage.

Referenced by d2i_gsiProxyPolicy().

gsiProxyPolicy_t* gsiProxyPolicy_new (  ) 

Definition at line 115 of file XrdCryptosslgsiAux.cc.

References ASN1_F_GSIPROXYPOLICY_NEW, c, OBJ_txt2obj_fix(), gsiProxyPolicy_t::policy, and gsiProxyPolicy_t::policyLanguage.

Referenced by d2i_gsiProxyPolicy(), and gsiProxyCertInfo_new().

int i2d_gsiProxyCertInfo ( gsiProxyCertInfo_t pci,
unsigned char **  pp 
)

Definition at line 302 of file XrdCryptosslgsiAux.cc.

References i2d_gsiProxyPolicy(), gsiProxyCertInfo_t::proxyCertPathLengthConstraint, gsiProxyCertInfo_t::proxyPolicy, and v1.

Referenced by XrdSslgsiX509CreateProxy(), XrdSslgsiX509CreateProxyReq(), and XrdSslgsiX509SignProxyReq().

int i2d_gsiProxyPolicy ( gsiProxyPolicy_t pol,
unsigned char **  pp 
)

Definition at line 194 of file XrdCryptosslgsiAux.cc.

References gsiProxyPolicy_t::policy, and gsiProxyPolicy_t::policyLanguage.

Referenced by i2d_gsiProxyCertInfo().

static ASN1_OBJECT* OBJ_txt2obj_fix ( const char *  s,
int  no_name 
) [static]

Definition at line 67 of file XrdCryptosslgsiAux.cc.

References buf, i, j, NULL, and p.

Referenced by gsiProxyPolicy_new(), XrdSslgsiX509CreateProxy(), XrdSslgsiX509CreateProxyReq(), and XrdSslgsiX509SignProxyReq().

bool XrdSslgsiProxyCertInfo ( const void *  extdata,
int &  pathlen,
bool *  haspolicy 
)

Definition at line 338 of file XrdCryptosslgsiAux.cc.

References d2i_gsiProxyCertInfo(), gsiProxyCertInfo_OID, p, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, gsiProxyCertInfo_t::proxyPolicy, and s.

Referenced by Display(), and XrdCryptosslgsiX509Chain::Verify().

void XrdSslgsiSetPathLenConstraint ( void *  extdata,
int  pathlen 
)

Definition at line 389 of file XrdCryptosslgsiAux.cc.

References d2i_gsiProxyCertInfo(), gsiProxyCertInfo_OID, p, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, and s.

int XrdSslgsiX509CreateProxy ( const char *  fnc,
const char *  fnk,
XrdProxyOpt_t pxopt,
XrdCryptosslgsiX509Chain xp,
XrdCryptoRSA **  kp,
const char *  fnp 
)

Definition at line 428 of file XrdCryptosslgsiAux.cc.

References XrdProxyOpt_t::bits, bits, DEBUG, XrdProxyOpt_t::depthlen, EPNAME, fc, fchmod(), fclose(), fopen, fp, XrdSutRndm::GetUInt(), gsiProxyCertInfo_new(), gsiProxyCertInfo_OID, i2d_gsiProxyCertInfo(), int, kErrPX_BadEECfile, kErrPX_BadEECkey, kErrPX_Error, kErrPX_ExpiredEEC, kErrPX_GenerateKey, kErrPX_NoResources, kErrPX_ProxyFile, kErrPX_SetAttribute, kErrPX_SetPathDepth, kErrPX_Signing, RooFitShortHand::L(), malloc(), OBJ_txt2obj_fix(), PRINT, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, XrdCryptoX509Chain::PushBack(), sprintf(), XrdProxyOpt_t::valid, and XrdCryptosslASN1toUTC().

Referenced by XrdSecProtocolgsi::InitProxy(), and main().

int XrdSslgsiX509CreateProxyReq ( XrdCryptoX509 xcpi,
XrdCryptoX509Req **  xcro,
XrdCryptoRSA **  kcro 
)

Definition at line 777 of file XrdCryptosslgsiAux.cc.

References bits, d2i_gsiProxyCertInfo(), DEBUG, EPNAME, XrdSutRndm::GetUInt(), gsiProxyCertInfo_new(), gsiProxyCertInfo_OID, i, i2d_gsiProxyCertInfo(), XrdCryptoX509::IsValid(), kErrPX_Error, kErrPX_ExpiredEEC, kErrPX_GenerateKey, kErrPX_NoResources, kErrPX_SetAttribute, kErrPX_SetPathDepth, kErrPX_Signing, malloc(), OBJ_txt2obj_fix(), XrdCryptoX509::Opaque(), p, PRINT, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, s, and sprintf().

Referenced by main(), and XrdSecProtocolgsi::ServerDoCert().

int XrdSslgsiX509SignProxyReq ( XrdCryptoX509 xcpi,
XrdCryptoRSA kcpi,
XrdCryptoX509Req xcri,
XrdCryptoX509 **  xcpo 
)

Definition at line 991 of file XrdCryptosslgsiAux.cc.

References d2i_gsiProxyCertInfo(), DEBUG, EPNAME, XrdOucString::erase(), gsiProxyCertInfo_new(), gsiProxyCertInfo_OID, i, i2d_gsiProxyCertInfo(), int, XrdCryptoRSA::kComplete, kErrPX_BadEECkey, kErrPX_BadExtension, kErrPX_BadNames, kErrPX_Error, kErrPX_ExpiredEEC, kErrPX_NoResources, kErrPX_SetAttribute, kErrPX_SetPathDepth, kErrPX_Signing, RooFitShortHand::L(), XrdOucString::length(), malloc(), XrdCryptoX509::NotAfter(), OBJ_txt2obj_fix(), XrdCryptoX509::Opaque(), XrdCryptoX509Req::Opaque(), XrdCryptoRSA::Opaque(), p, PRINT, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, XrdOucString::rfind(), s, XrdCryptoRSA::status, strtol(), and XrdCryptoX509Req::Version().

Referenced by XrdSecProtocolgsi::ClientDoPxyreq(), and main().


Variable Documentation

const char* XrdCryptosslgsiAuxCVSID = "$Id: XrdCryptosslgsiAux.cc 31508 2009-12-02 19:11:01Z brun $"

Definition at line 3 of file XrdCryptosslgsiAux.cc.


Generated on Tue Jul 5 16:08:06 2011 for ROOT_528-00b_version by  doxygen 1.5.1