00001
00002 #ifndef __CRYPTO_SSLGSIAUX_H__
00003 #define __CRYPTO_SSLGSIAUX_H__
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <XrdCrypto/XrdCryptosslgsiX509Chain.hh>
00018 #include <XrdCrypto/XrdCryptoX509Req.hh>
00019 #include <XrdCrypto/XrdCryptoRSA.hh>
00020
00021
00022 #define gsiProxyCertInfo_OID "1.3.6.1.4.1.3536.1.222"
00023
00024
00025
00026
00027
00028 bool XrdSslgsiProxyCertInfo(const void *ext, int &pathlen, bool *haspolicy = 0);
00029 void XrdSslgsiSetPathLenConstraint(void *ext, int pathlen);
00030
00031
00032
00033
00034 typedef struct {
00035 int bits;
00036 int valid;
00037 int depthlen;
00038
00039
00040 } XrdProxyOpt_t;
00041
00042
00043 int XrdSslgsiX509CreateProxy(const char *, const char *, XrdProxyOpt_t *,
00044 XrdCryptosslgsiX509Chain *, XrdCryptoRSA **, const char *);
00045
00046
00047 int XrdSslgsiX509CreateProxyReq(XrdCryptoX509 *,
00048 XrdCryptoX509Req **, XrdCryptoRSA **);
00049
00050
00051 int XrdSslgsiX509SignProxyReq(XrdCryptoX509 *, XrdCryptoRSA *,
00052 XrdCryptoX509Req *, XrdCryptoX509 **);
00053
00054
00055
00056 #define kErrPX_Error 1 // Generic error condition
00057 #define kErrPX_BadEECfile 2 // Absent or bad EEC cert or key file
00058 #define kErrPX_BadEECkey 3 // Inconsistent EEC key
00059 #define kErrPX_ExpiredEEC 4 // EEC is expired
00060 #define kErrPX_NoResources 5 // Unable to create new objects
00061 #define kErrPX_SetAttribute 6 // Unable to set a certificate attribute
00062 #define kErrPX_SetPathDepth 7 // Unable to set path depth
00063 #define kErrPX_Signing 8 // Problems signing
00064 #define kErrPX_GenerateKey 9 // Problem generating the RSA key
00065 #define kErrPX_ProxyFile 10 // Problem creating / updating proxy file
00066 #define kErrPX_BadNames 11 // Names in certificates are bad
00067 #define kErrPX_BadSerial 12 // Problems resolving serial number
00068 #define kErrPX_BadExtension 13 // Problems with the extensions
00069
00070 #endif
00071