|
xrootd
|
#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>
| #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 | |||
| ) |
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, | |
| c | |||
| ) |
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 XrdSslgsiX509FillUnknownExt(), and XrdSslgsiX509Asn1PrintInfo().
| #define XRDGSI_CONST |
| #define XRDGSI_VOMS_ACSEQ_OID "1.3.6.1.4.1.8005.100.100.5" |
Referenced by XrdSslgsiX509GetVOMSAttr().
| #define XRDGSI_VOMS_ATCAP_OID "1.3.6.1.4.1.8005.100.100.4" |
Referenced by XrdSslgsiX509FillVOMS().
| 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 | ||
| ) |
References gsiProxyPolicy_new(), gsiProxyPolicy_free(), and ASN1_F_D2I_GSIPROXYPOLICY.
Referenced by d2i_gsiProxyCertInfo().
| void gsiProxyCertInfo_free | ( | gsiProxyCertInfo_t * | pci | ) |
References gsiProxyCertInfo_t::proxyCertPathLengthConstraint.
Referenced by d2i_gsiProxyCertInfo().
| gsiProxyCertInfo_t* gsiProxyCertInfo_new | ( | ) |
| void gsiProxyPolicy_free | ( | gsiProxyPolicy_t * | pol | ) |
References gsiProxyPolicy_t::policyLanguage, and gsiProxyPolicy_t::policy.
Referenced by d2i_gsiProxyPolicy().
| gsiProxyPolicy_t* gsiProxyPolicy_new | ( | ) |
References gsiProxyPolicy_t::policyLanguage, OBJ_txt2obj_fix(), gsiProxyPolicy_t::policy, and ASN1_F_GSIPROXYPOLICY_NEW.
Referenced by d2i_gsiProxyPolicy(), and gsiProxyCertInfo_new().
| int i2d_gsiProxyCertInfo | ( | gsiProxyCertInfo_t * | pci, |
| unsigned char ** | pp | ||
| ) |
| int i2d_gsiProxyPolicy | ( | gsiProxyPolicy_t * | pol, |
| unsigned char ** | pp | ||
| ) |
References gsiProxyPolicy_t::policyLanguage, and gsiProxyPolicy_t::policy.
Referenced by i2d_gsiProxyCertInfo().
| static ASN1_OBJECT* OBJ_txt2obj_fix | ( | const char * | s, |
| int | no_name | ||
| ) | [static] |
References XRDGSI_CONST.
Referenced by gsiProxyPolicy_new(), XrdSslgsiX509CreateProxy(), XrdSslgsiX509CreateProxyReq(), and XrdSslgsiX509SignProxyReq().
| bool XrdSslgsiProxyCertInfo | ( | const void * | extdata, |
| int & | pathlen, | ||
| bool * | haspolicy | ||
| ) |
References gsiProxyCertInfo_OID, d2i_gsiProxyCertInfo(), XRDGSI_CONST, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, and gsiProxyCertInfo_t::proxyPolicy.
Referenced by XrdCryptosslgsiX509Chain::Verify(), and Display().
| void XrdSslgsiSetPathLenConstraint | ( | void * | extdata, |
| int | pathlen | ||
| ) |
| int XrdSslgsiX509Asn1PrintInfo | ( | int | tag, |
| int | xclass, | ||
| int | constructed, | ||
| int | indent | ||
| ) |
References EPNAME, and BIO_PRINT.
Referenced by XrdSslgsiX509FillUnknownExt().
| int XrdSslgsiX509CreateProxy | ( | const char * | fnc, |
| const char * | fnk, | ||
| XrdProxyOpt_t * | pxopt, | ||
| XrdCryptosslgsiX509Chain * | xp, | ||
| XrdCryptoRSA ** | kp, | ||
| const char * | fnp | ||
| ) |
References EPNAME, PRINT, XrdProxyOpt_t::bits, XrdProxyOpt_t::valid, XrdProxyOpt_t::depthlen, fopen, DEBUG, fclose(), kErrPX_BadEECfile, XrdCryptosslASN1toUTC(), kErrPX_ExpiredEEC, kErrPX_BadEECkey, kErrPX_NoResources, kErrPX_GenerateKey, XrdSutRndm::GetUInt(), kErrPX_SetAttribute, gsiProxyCertInfo_new(), gsiProxyCertInfo_t::proxyCertPathLengthConstraint, kErrPX_SetPathDepth, gsiProxyCertInfo_OID, OBJ_txt2obj_fix(), i2d_gsiProxyCertInfo(), kErrPX_Error, kErrPX_Signing, XrdCryptoX509Chain::PushBack(), and kErrPX_ProxyFile.
Referenced by main(), and XrdSecProtocolgsi::InitProxy().
| int XrdSslgsiX509CreateProxyReq | ( | XrdCryptoX509 * | xcpi, |
| XrdCryptoX509Req ** | xcro, | ||
| XrdCryptoRSA ** | kcro | ||
| ) |
References EPNAME, XrdCryptoX509::Opaque(), PRINT, XrdCryptoX509::IsValid(), kErrPX_ExpiredEEC, kErrPX_NoResources, kErrPX_GenerateKey, XrdSutRndm::GetUInt(), DEBUG, kErrPX_SetAttribute, gsiProxyCertInfo_new(), gsiProxyCertInfo_OID, d2i_gsiProxyCertInfo(), XRDGSI_CONST, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, kErrPX_SetPathDepth, i2d_gsiProxyCertInfo(), kErrPX_Error, OBJ_txt2obj_fix(), and kErrPX_Signing.
Referenced by main(), and XrdSecProtocolgsi::ServerDoCert().
| int XrdSslgsiX509DumpExtensions | ( | XrdCryptoX509 * | xcpi | ) |
References EPNAME, PRINT, XrdCryptoX509::Opaque(), XRDGSI_CONST, and XrdSslgsiX509FillUnknownExt().
| int XrdSslgsiX509FillUnknownExt | ( | XRDGSI_CONST unsigned char ** | pp, |
| long | length | ||
| ) |
References EPNAME, XRDGSI_CONST, PRINT, XrdSslgsiX509Asn1PrintInfo(), and BIO_PRINT.
Referenced by XrdSslgsiX509DumpExtensions().
| int XrdSslgsiX509FillVOMS | ( | XRDGSI_CONST unsigned char ** | pp, |
| long | length, | ||
| bool & | getvat, | ||
| XrdOucString & | vat | ||
| ) |
References EPNAME, XRDGSI_CONST, PRINT, BIO_GET_STRING, XRDGSI_VOMS_ATCAP_OID, DEBUG, and XrdOucString::length().
Referenced by XrdSslgsiX509GetVOMSAttr().
| int XrdSslgsiX509GetVOMSAttr | ( | XrdCryptoX509 * | xcpi, |
| XrdOucString & | vat | ||
| ) |
References EPNAME, PRINT, XrdCryptoX509::Opaque(), DEBUG, XRDGSI_VOMS_ACSEQ_OID, XRDGSI_CONST, and XrdSslgsiX509FillVOMS().
Referenced by Display(), and XrdSecProtocolgsi::ExtractVOMS().
| int XrdSslgsiX509SignProxyReq | ( | XrdCryptoX509 * | xcpi, |
| XrdCryptoRSA * | kcpi, | ||
| XrdCryptoX509Req * | xcri, | ||
| XrdCryptoX509 ** | xcpo | ||
| ) |
References EPNAME, PRINT, XrdCryptoX509::NotAfter(), kErrPX_ExpiredEEC, XrdCryptoX509::Opaque(), XrdCryptoRSA::status, XrdCryptoRSA::kComplete, kErrPX_BadEECkey, XrdCryptoRSA::Opaque(), kErrPX_NoResources, XrdCryptoX509Req::Opaque(), XrdOucString::length(), kErrPX_BadNames, XrdOucString::rfind(), XrdCryptoX509Req::Version(), XrdOucString::erase(), kErrPX_SetAttribute, gsiProxyCertInfo_OID, d2i_gsiProxyCertInfo(), XRDGSI_CONST, gsiProxyCertInfo_t::proxyCertPathLengthConstraint, DEBUG, kErrPX_BadExtension, gsiProxyCertInfo_new(), kErrPX_SetPathDepth, i2d_gsiProxyCertInfo(), kErrPX_Error, OBJ_txt2obj_fix(), and kErrPX_Signing.
Referenced by main(), and XrdSecProtocolgsi::ClientDoPxyreq().
| const char* XrdCryptosslgsiAuxCVSID = "$Id$" |
1.7.5