xrootd
XrdCryptosslgsiAux.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef __CRYPTO_SSLGSIAUX_H__
3 #define __CRYPTO_SSLGSIAUX_H__
4 /******************************************************************************/
5 /* */
6 /* X r d C r y p t o s s l g s i A u x . h h */
7 /* */
8 /* (c) 2005, G. Ganis / CERN */
9 /* */
10 /******************************************************************************/
11 
12 /* ************************************************************************** */
13 /* */
14 /* GSI utility functions */
15 /* */
16 /* ************************************************************************** */
20 #include <XrdOuc/XrdOucString.hh>
21 
22 // The OID of the extension
23 #define gsiProxyCertInfo_OID "1.3.6.1.4.1.3536.1.222"
24 
25 //
26 // Function to check presence of a proxyCertInfo and retrieve the path length
27 // constraint. Written following RFC3820 and examples in openssl-<vers>/crypto
28 // source code. Extracts the policy field but ignores it contents.
29 bool XrdSslgsiProxyCertInfo(const void *ext, int &pathlen, bool *haspolicy = 0);
30 void XrdSslgsiSetPathLenConstraint(void *ext, int pathlen);
31 
32 //
33 // Proxies
34 //
35 typedef struct {
36  int bits; // Number of bits in the RSA key [512]
37  int valid; // Duration validity in secs [43200 (12 hours)]
38  int depthlen; // Maximum depth of the path of proxy certificates
39  // that can signed by this proxy certificates
40  // [-1 (== unlimited)]
42 //
43 // Create proxy certificates
44 int XrdSslgsiX509CreateProxy(const char *, const char *, XrdProxyOpt_t *,
45  XrdCryptosslgsiX509Chain *, XrdCryptoRSA **, const char *);
46 //
47 // Create a proxy certificate request
50 //
51 // Sign a proxy certificate request
54 //
55 // Dump extensions
57 //
58 // Get VOMS attributes, if any
60 
61 /******************************************************************************/
62 /* E r r o r s i n P r o x y M a n i p u l a t i o n s */
63 /******************************************************************************/
64 #define kErrPX_Error 1 // Generic error condition
65 #define kErrPX_BadEECfile 2 // Absent or bad EEC cert or key file
66 #define kErrPX_BadEECkey 3 // Inconsistent EEC key
67 #define kErrPX_ExpiredEEC 4 // EEC is expired
68 #define kErrPX_NoResources 5 // Unable to create new objects
69 #define kErrPX_SetAttribute 6 // Unable to set a certificate attribute
70 #define kErrPX_SetPathDepth 7 // Unable to set path depth
71 #define kErrPX_Signing 8 // Problems signing
72 #define kErrPX_GenerateKey 9 // Problem generating the RSA key
73 #define kErrPX_ProxyFile 10 // Problem creating / updating proxy file
74 #define kErrPX_BadNames 11 // Names in certificates are bad
75 #define kErrPX_BadSerial 12 // Problems resolving serial number
76 #define kErrPX_BadExtension 13 // Problems with the extensions
77 
78 #endif
79